I think this is a case where I would get emergency care for your dog. Here's why:
An open infection, vaginal discharge, matting, even just feces stuck to the fur can attract flies which lay eggs, and maggots are the result. These maggots then migrate into the rectum in search of food. They eat the fecal matter in the rectum and then they can burrow into the muscle, causing serious damage to the muscle and intestines. So this is a case where your dog needs emergency attention, as this could be a life-threatening situation. This is actually most common in pet rabbits kept outside and other animals that spend lots of time outdoors.
The fact that she has diarrhea is not a good sign. It suggests that these maggots may have traveled up the rectum and into the intestinal tract, causing inflammation and it's inflammation that triggers diarrhea and loose stools.
Aside from removing these one by one, there's not much you can do because I suspect they are already inside her body. And we need to stop them before they cause serious damage. At the very least, I suspect she may suffer permanent muscle damage that may make her incontinence even worse, so for that reason alone I would seek out help tonight. This condition can kill in a matter of hours once the maggots go internally, so immediate action is necessary.
I'm sorry I don't have better news for you.
Here's a site on myiasis (maggot infestations) in dogs:http://www.petplace.com/dogs/myiasis-maggots-in-dogs/page1.aspx
I hope your dog is feeling better soon! Don't hesitate to let me know if you have any additional questions! Just reply and we can go from there.
****Please "ACCEPT" if my answer was helpful!****
**As experts, we are not compensated for our time and efforts unless you "accept!"**