How old is your dog? Has it been vaccinated for Parvo? If your dog is a puppy and has Not been vaccinated for Parvo, that could be the problem. It can also be that your dog is bleeding Internally. Either way, this is a Very, Very Serious situation and can be Life Threatening if you don't take your dog to the vet FAST! Please, for your dogs sake, don't wait on this! Emergency Vets are open 24/7! You need to get this poor dog in and get this taken care of, before this situation gets worse and you lose him.
He might have Parvo or bleeding internally. I would take him to vet ASAP.
If your dog is pooping fresh blood after defecation then following conditions can cause this but final diagnosis is made by the vet.
- Inflammation of rectum
- Rectal tumor
- Rectal polyps
- Anal fissures
It must be a female dog and it mean the dog need to mate