It's possible that it could just be irritation possibly due to either anal sex or the medication you're taking. However, It is definitely possible to get an STD through Anal Sex. If you're worried, get checked out.
Actually Anal sex is very susceptible to STDs and many other diseases because of the amount of bacteria in the rectum. What you have could be irritation as well as hemorrhoids (internal or external. Try some over the counter ointments for itching, and get checked to be sure you're ok. Good luck!
the antibiotics you are on aren't only killing the "Bad" bacteria in your body that have caused the PID - they are also killing the "good' protective bacteria in your bowels too. Kill off the "good' bacteria and you get diarrhea. You get diarrhea you get irritated. You can also get yeast infections around your anus too.
My suggestion to you is - if you like yogurt - buy some of the newer bacteria containing yogurts and eat it 2 or 3 times a day for the next week. I think only danimals has the lactobacilluss GG strains in it but if you can tolerate fruit flavored yogurt - it's the type you want. You can also buy lactobacillus gg supplements - sold under the brand name culturelle. Most CVS drugstores carry it and most natural stores carry it too. You can take that twice a day until you are done with your antibiotics to help. That particular strain has been proven to be most helpful compared to the not always so helpful lactobacillus acidophilus strains.
Also don't hesitate to put a barrier cream around your anal area - like zinc oxide, desitin, even good ole vaseline or any baby butt cream. It will help to protect the irritated skin from more irritation. soaking in the bathtub feels good too. Throw in some epsom salts or even baking soda to soften the water to soothe your skin too.
And yes - you can get std's from anal sex. I don' t think that's the issue here though - sounds like it's the antibiotics working.
grace