Ok! Ive had this a few times my self. Unless you have got some one in the family thats had serious bowel issues,for now i wouldnt worry to much,but when ive had this its been self inflicted.Meaning.....ive had the problem when Ive not had enough fibre and water in the body.When there is blood coming with the stool,(poop)its because..
Its caused by straining,you dont have to be straining as if you are giving birth for this to happen neither lol,sorry! no laughing matter really! .But over some time if your poop isnt soft enough because of lack of fibre and water it causes this issue ,you have piles inside near the back passage.
Bleeding can be showing like you describe but also if you ever have blood inside the stool,so your poop is very dark red almost black then there is a possibility of more serious issues and never wait to see a doctor.
If you dont correct this by eating right and this continues the piles will also come out side the body so you can feel and see them,and are painful.Plus then can also cause other problems too.
Please dont panic,but first try to take in more fibre and water and then if things do not settle ,say in a few more days then go see your Doctor.Let him know how long this has been going on and what you have been eating etc.<br/.You might want to look up on the nett hi fibre foods t help you and how much for you the daily requirement is. Good Luck!