If the blood is bright red, then it's flowing from somewhere close by your "exit." The likeliest culprit would be a hemmerhoid (sp?). There are some called, "bleeders," that are painless but do bleed with bowel movements.
If that's what you have, they're not dangerous, though it's a sign that the diet needs more fiber and/or that you need to be careful not to strain when having bowel movements or to sit on the toilet for a long time (both of which help cause and maintain hemmerhoids) but to wait until the "urge" is on you to go to the bathroom.