Hi, welcome to HealthcareMagic.
You are most probably suffering from dysentery
. The blood and mucus doesn’t have anything to do with you holding in your motion for some time. You should consult your physician and have you blood and stool examined. You might be prescribed antibiotics and ORS
(Oral Rehydration Solution) by your physician. Drink copious amounts of water.