It seems that you are having internal piles.
Consult surgeon and get examined.
I think with proper passing stool and some changing your food habit may give you relief.
Surgery may not require.
Avoid fried, chillies and junk food.
Take plenty of water and more fiber containing food.
, take mild laxative daily at night.
Ok and take care.