If it is indeed anchor worms I believe the actual worms have to be removed by hand...but maybe you won't have to because you caught it so quickly. I've heard of using something called "Dimlin Powder" to kill them but I don't know much about it.
I pulled up this from a website, though:
"The only known method of killing this parasite, without killing the Koi is DIMLIN POWDER which can be used safely at any water temperature and has an action of sterilizing the adult and larval stages of this parasite which insures that all eggs produced, after the application of Dimlin, will not hatch.
Method:- Dimlin Powder at the rate of 1 gram per ton of pond water. Measure out the quantity required and mix in a plastic bucket with pond water ensuring that the powder is dissolved then add to the pond in the previous manner. A second dosage may be needed to ensure that the life cycle of the Anchor Worm has been halted. After this second application the dead adults, which will still be hanging from the Koi, can be removed using tweezers but making sure that the hooks, as well as the tail of the Anchor Worm are removed and then apply a proprietary Topical dressing to prevent a secondary infection.
There is another way of removing Anchor Worm but more care has to be taken to remove all parts of the Anchor Worm ... that method is.... mix a strong solution of Potassium Permanganate crystals of 1 gram into 25 mls of hot water. Mix well until dissolved and then dip the tweezers into this solution prior to the removal of the Anchor Worm, once the solution touches the body the Anchor Worm releases its grip immediately and it can then be lifted clear of the Koi and the water, wipe the end of the tweezers on a clean tissue to remove all traces before attempting to remove another Anchor Worm."
(
http://www.koicarp.net/koi_medication/parasites2.html)
It's for koi but goldfish are very simular.
Sorry I can't be of much help...I've never dealt with anchor worms before. Usually the only fish that get them are goldfish and koi...and I haven't kept either species.
Good luck

.