Hello practo user, bleeding while passing stools can occur due to chronic causes like fissure, hemorrhoids, inflammatory bowel diseases like chrons and ulcerative colitis etc.
You need a proper evaluation like through history, examination and if required colonoscopy.
Next Steps
pls don't neglect and consult a gastroenterology specialist for through evaluation and appropriate treatment.