Thank you for the query.
Most likely you do suffer from hemorrhoids. However other anus diseases like fissure, polyp or even a cancer are possible (the cancer is very rare, usually appears over 50, does not hurt at the beginning and can easily bleed when touching it).
Hemorrhoids and fissure are strongly associated with constipations. Fissure gives strong pain while passing the stool.
I suggest you to visit your doctor, have rectal examination
and rectosigmoidoscopy performed.
To avoid constipations you should drink more water, increase fiber rich products and physical activity.
Hope this will help.