Can you then describe the worm in more detail.
Is the worm thread like.
What colour in the worm.
Anchor Worm (a.k.a. Lernaea)
Taken from this link.
http/www.fish-disease.net/diseases.htm
Symptoms:
Infected fish can be seen with whitish red worm-like threads, about ¼ inch long. Trailing at the rear of female parasites are two long, tube-like egg sacs. The parasites can be found anywhere on the body of the fish, including the eyes, gills and fins. Raised ulcers may appear at the site of attachment. Consequently, secondary bacterial infections may occur. The tale-tale sign that your fish is infected will be if you notice it rubbing or scraping against objects in the aquarium. It does this in an effort to remove the parasite.
Cause:
The parasitic crustacean Lernaea. Lernaea burrow into the muscle and gill tissue of fish, often times reaching as deeply as the internal organs, causing severe damage. Heavy infestations can cause significant weight loss and death.
Treatment:
You should kill all visible worms by dabbing them with a cotton swab, dipped in Potassium Permanganate or an anti-parasitic medication. Then you should carefully remove them from the fish with tweezers. You should kill the parasites before removing them because if they have burrowed deeply, removing them alive could cause the fish pain and significant physical damage. Once you’ve removed the parasite, you should then dab the wounds with Methylene Blue to prevent secondary bacterial infections from occurring. It is highly recommended that you feed the fish with medicated food. The tank will also need to be treated to kill any unseen, free-swimming juvenile parasites. You can use Fluke Tabs, Clout, Paragon or Trifon for this.