Most fish if kept in ideal environments are usually able to keep parasites in check,
The parasite doesn't want to kill it's host. It would prefer to live in "harmony with it's host"
But if something goes wrong however slightly in the tank and causes undue stress on the fish,
That tips the scale in the parasites favor, or whatever other little nasty may be laying in wait.
If it is parasitic there is any number of things you can buy to treat for parasites, However if it is in fact "the Camallanus worm" then Levamisole Hydrochloride is the treatment of choice among many hobbists.
This medicine has several names: Levasole (soluble pig wormer, mix with water), Prohibit (powdered drench, mix with water), Tramisol (sheep bolus - US), Ripercole (soluble powder for sheep - Australia, 'Ripercol Vet" or "Levaject Vet" in Denmark), Levam-30 (oral powder - India), Levacide (UK injectable), Avitrol Plus (liquid bird worming syrup, add to food, or directly to tank) and there are many others,