Fresh red blood often comes from the lower part of the intestine or the rectum, while black, tarry stool can point to digested blood from higher up in the gastrointestinal tract. Acute diarrhoea can sometimes contain smaller amounts of fresh blood, but the appearance alone does not reliably tell you the cause.
At the same time, assess your dog's energy, appetite and fluid intake and whether it is vomiting or in pain. Severe diarrhoea with blood can cause significant fluid loss, and some dogs deteriorate quickly. Based on the examination, the vet decides whether blood tests, stool tests, fluid therapy or other diagnostics are needed.
Contact a vet if the blood keeps coming back or is obvious, if the stool is black, or if your dog also becomes lethargic, vomits, is in pain or does not want to drink. Large amounts of blood or a rapidly worsening general condition should be assessed urgently.