Considering your age and if association with other symptoms like constipation is could be hemorrhoids or it can could be a GI infection.
Highly unlikely of anything serious considering your age.
You can take consultation to provide complete history to filter out the issue.
Next Steps
You could do a stool test and consult a general surgeon/Gastroenterologist
Health Tips
Relax.Dont strain too much while passing stools.
If constipation have high fibre diet.
Maintain adequate hydration.