There should be no "white worm" thing coming out anywhere as the waste of a healthy seahorse will be dark purple to black in colour.
If it is coming from the anal opening it suggests problems internally that could be a nutritional problem but more likely a parasitical problem more common in wildcaught, net pen, and tank raised seahorses than the more expensive True captive bred seahorses. You may find some information on this
GUIDE TO SEAHORSE DISEASES.
If that article is of no help then you need to post all your information, like tank size, how long set up, tank mates, how long you've had this seahorse and anything else in the tank, and more, so that Ann or another qualified person may see it and give you some help.
First of all, temperature recommendations are to run between 68° and 74°F.
Ammonia can be deadly to the seahorse so you need to find out why it is happening.
Most times, overfeeding and poor tank husbandry is responsible, but placing the seahorse in the tank before it is properly cycled could also be a reason.
Tank husbandry is important because most seahorses are very picky about what they eat and a lot of food is left in the tank and can be trapped unseen in between rocks and around hitch bases etc.. This provides a good bed for nasty bacteria like vibriosis and others to develop and multiply on, and at temperatures above 74°, multiply exponentially with each rising degree in temperature.
Nutrition wise, frozen mysis have more nutrient than frozen brine, but you can enrich live brine with Dan's Food from seahorsesource.com and have the best food possible for them.
Below my writings on my
SEAHORSE KEEPING page, you will find links to excellent information for keeping seahorses, with an explanation of why we need to keep the temperatures lower for our captive seahorses.