treatment for horsehair worm?

Not that I'm aware of, but since they pose no threat to creatures other than arthropods if you introduced some fish they would probably eat the adults after they emerge and you could interrupt the life cycle and eradicate them.
 
Correct
 
The horsehair worms which affect ghost shrimp are Nectonema sp.; they can also infect various other decapods such as crabs, other shrimp, and possibly crayfish (not sure this has been documented), so if you have any of those in your tank you should be careful. Other inverts are safe.

Horsehair worms must emerge from the host, find a mate, and reproduce sexually. If you destroy or isolate infected shrimp before the worm emerges, you are safe.
 
AquariaCentral.com