When your dog is bleeding from the anus it's called Hemorrhagic Gastroenteritis this condition is caused by inflammation of the digestive tract.
Bleeding from your dogs anus can also be caused by parasites in your dogs digestive tract as well such as worms.
When your dog is bleeding from the anus you should give them worm medicine and/or take the dog to the vet to find out exactly what is wrong.