Sorry, I didn’t actually answer your question on how to get the tree.
There doesn’t seem to be a way (that I can find) to download the taxon tree or any parts of it from WoRMS. If the built-in tree in Specify doesn’t contain AphiaID, then there’s one other way I can think of.
If you have a list of all the species you will be cataloging in your database, you can use the MatchTaxa tool in WoRMS to compare your species against the species names listed in WoRMS. When you select your outputs, make sure you check AphiaID, and Classification. Then, even if you start with just species names, you will get the higher classification for those species and when you create your taxon tree in the Workbench in Specify, you can assign AphiaID to a field of your choosing in your database.