Hello, Thank you for asking your query at DoctorSpring.
From your symptoms of pain during defecation, it points out to one diagnosis, Hemorrhoids.
Hemorrhoids are bulgings and distention into the anal canal. They tend to produce pain during defecation and sometimes bleeding in stools. Its very important you decrease any cause which produces increased intra abdominal pressure like, constipation, chronic cough. Treat these conditions if you have them as they aggravate hemorrhoids.
You can take Tylenol for pain. Take a basin and add potassium permanganate in warm water in tub. Sit for half an hour in the tub everyday. Also take a course of amoxicillin for five days twice a day. I suggest you to also visit a surgeon who will check the degree of hemorrhoids and see if surgery is required.
Hope this helps. Please feel free to ask follow-up questions