Thanks for writing your query.
After reading your post, I would suggest that you should get your stool examined for -
> Occult blood
Mucus along with blood in stools is indicative of some infection in your gastrointestinal tract.
You can take antacid
20 mg once a day along with antibiotic like Ciprofloxacin
500 mg twice a day along with antiamoebic like Metronidiazole 400 mg thrice a day and a probiotic
Another possibility of rectal bleeding
is piles, anal fissue which needs clinical examination and management. It can get irritated by spicy and oily foods. Sitz bath is helpful in such cases.
I hope this is helpful to you.