Its good that the bleeding is bright red,which suggest you are not suffering from any upper G.I.Bleed and regarding your anal pain
, especially when you pass a stool, it is likely to be a non-serious condition such as an anal fissure
or piles.For this you need to do that you do not suffer from constipation
or have excessive spicy food drink plenty of fluids and if someday you suffer form constipation i would suggest you to have laxatives/stool softeners like cremaffin
plus,and one thing more let me know that while defecating do you feel a mass like thing coming out of your anal canal?