If you see blood in your dog's stool, take them to the vet as soon as possible. Many potential causes exist, and some can be serious.
Possible causes include dietary indiscretion, ingestion of foreign objects, infectious diseases such as parvovirus or giardia, parasites, inflammatory bowel disease, and rectal injuries.
You should collect a stool sample to bring to the vet and seek immediate veterinary attention, as bloody stools can indicate a serious medical condition.