It looks a bit like some sort of insect larva. I'd get rid of it in case it's predatory. Never seen worms in a shrimp, though I have heard of them in crayfish.. bummer. Given the worms are likely inverts too, I doubt there's much you can do about them without harming the shrimp too.
Edit.. having now looked up horsehair worms.. are you sure that's what you have ? Most known species are parasites of insects, not shrimp. May be some other type of parasite though.
Edit again.. Seems there is at least one horsehair worm that parasitizes Ghost shrimp.. how unfortunate. I live and I learn.
You can try dunking the shrimp in a fairly strong salt bath, which may kill the worm, but the shrimp may not survive it. These things can lay thousands of eggs so they are going to spread to the other shrimp.. I'd be thinking of euthanizing any shrimp who have a worm now, then remove shrimp who appear ok to another clean container. I'd salt the tank heavily to kill any worms in there and wait for awhile to be sure any eggs have hatched and died before using the tank for Ghost shrimp again. Without a host, the worm eggs will, hopefully, not survive too long after hatching.