Hello,
My the same thing happened to my dog.

I don't mean to scare you but you need to take them to the vet asap.
my precious yorkie had picked up a high gastro infection that caused his stool to have blood and even vomited.He stayed in the hospital for 3 days and thank God got better. Apparently he picked it up from another dog. They can pick up many infections when you take them outside or to the park.