Thank you for your query,
Hurting while pooping and associate with blood is due to constipation
with fissure formation.
I advise you to take plenty of oral fluids, dietary fiber
rich foods like vegetables, fruits daily and if there is constipation you can take oral lactulose
aftre doctor prescription.
Don't come to a conclusion of a diagnosis by searching on internet.
You discuss with your parts of your health issues and consult your Physician for the evaluation and treatment.
Hope I have answered your query.