Thanks for writing your query.
After reading your post, I would advise that you should get yourself clinically examined and investigated for hemorrhoids. Colonoscopy
will also be helpful in ruling out other causes of rectal bleeding
You can take an antacid like Omeprazole
40mg once a day before meals.
Also avoid spicy and oily foods.
Also avoid constipation
I hope this is helpful to you.