Hi.
Thanks for your query.
Noted your history of pain/tenderness from anus with swelling of dark purple color and worried about
STD. There is a warm sensation, no history of hemorrhoids, no painful defecation, nothing mentioned about anal sex or so.
I think this is due to either a mucosal prolapse or infection.
Since you are worried about STD, it is possible that you had anal sex.
I would advise you the following:
Consult a General Surgeon for clinical evaluation, per-rectal digital as well as proctoscopy examination and to tell you the exact diagnosis and further management.
If you are worried about STD, please get the battery of investigations as advised by your Doctor.
Till then have the following:
Sitz bath at least three times a day- before and after passing motion.
Mild laxative to keep the motion/stool soft and easy to pass out.
I hope this answer helps you for the right direction you asked for.