Anal. Can't poo! Watch
If you don't poo in the next day, you could talk to a pharmacist. You don't need to tell them about the anal...
As an evolution of apes, our bodies are designed to squat when defecating rather than sitting, place something like a potty stool below your toilet to rest your feet on, this should allow the muscles to relax and allow you to defecate without too much pain
I wouldn't overthink it. Don't strain (never strain!). Drink lots of water, eat healthily, relax and exercise.
If symptoms get worse or don't resolve in the next 3 days I'd seek medical help.
I'd review your anal sex technique if this is the way your body is responding. Sounds like you were not prepared (lube/properly relaxed/experienced) and/or your partner was too rough.