Need to heal
Ibuprophen could be irritating your gastro-intestinal tract.
You need to find out why you are having pain and see if change in life style can promote healing without relying on nsiads. Other things could be causing blood stools. Please go in for a complete medical check up.