The thing, is it actually a worm? Can you see it moving for example, or is it just a filament of something that wafts about when the fish moves?
I have seen in marine fish, parasitic worms living in spiracles and head pores, but not in a tetra. I am more inclined to think that the head pore of the fish is infected with hexamita or a similar protozoan, which although not common, does happen.
Presumably the other fish in your tank are happy and normal, and that your water parameters are fine. Most infctions of this type clear up themselves if it hasn't gone too far if the fish is in good water conditions. Depending on the cause, something like Octozin may help, but you'll need to be more sure about what it is before treating. Treating with the wrong stuff can cause more stress, lower the immune response and make matters worse.