Common de-wormers/anti-parasitic meds are Metronidazole (API General Cure, Seachem MetroPlex/Aquazole) and Praziquantel (Hikari PraziPro, some amount in API General Cure).
I think Praziquantel pretty much only does internal parasites and flukes. I believe Metronidazole does a little more, treating internal parasites, protozoa and also hexamita and some other bacteria. So I would recommend Metronidazole in this case. Both are plant safe and pretty well tolerated by fish. I think they might be safe with inverts, but not sure.
Medicated foods are more effective and faster acting, IF the fish actually eat the medicated foods.
Kensfish sells flakes and sticks medicated with Metronidazole, but you can make your own by soaking food in a mixture of Metro, Seachem Focus (binder), Seachem GarlicGuard (entices/attracts fish to eat the food -masks med taste/smell), and the food in a tiny amount of water (just enough to cover food and absorb without excess water).
Again that is if the fish are eating it. Medicating the water column is not as effective, but still works.
The fleshy sac hanging out I think was the anal glands and some intestine protruding out the anal vent. So yes, sounds like she had the parasite for quite some time and it looks painful. The stringy stuff the other fish pulled out of her might of been her fecal matter or her actual intestines. Sounds and looks to have been extremely painful.