It looks that you are suffering with constipation, due to constipation usually its happen, In Ayurveda you will definitely find a proper solution, meanwhile start to take fiber diet, Liquid intake, Butter milk, Soup, Papaya in your diet, also take Sitz bath. strictly avoid oily, spicy, heavy food.
Apply petroleum jelly locally if you have pain or itching.
Next Steps
Visit to nearby specialist Ksharsutra expert.