Thanks for the query
Most common reason for painless swelling near the anus are haemorrhoids.
Please do not panic, it can be easily cured. Visit a gastroenterologist for sclerotherapy
of the piles. It is simple procedure where they inject a chemical into the piles to get rid of it.
For now please continue the medications prescribed by your doctor
I hope I was of help