Hello and welcome
Yes, Irregular bowel movement can lead to hemorrhoids,
Chronic constipation or hardening of stool in rectum can lead to hemorrhoids.
Looking at your description, your problem might be related to any of such conditions like
stress and
anxiety induced,
Irritable bowel syndrome
colitis or gut infection
mal absorption syndrome
Acid peptic disease
I would advise you to follow these guidelines for 3 to 5 days if it doesn't help than you should visit a gastroenterologist for further evaluation.
You should avoid constipation by taking laxative or stool softeners
avoid fatty fried and junk food or carbonated drinks
Have lots of
dietary fiber, frsh fruits and vegetables in your diet
avoid smoking and alcohol consumption.
allay your anxiety and stress by doing Yoga,
meditation and relaxation exercises.
Hope this helps you, please feel free to ask for further assistance, I will happily answer you.
Best wishes