It rarely happens in dog. Please confirm about this with your vet as it can be due to some other infection in your dog. Many of the infections have the same symptoms like bloody poop. Infections can be like parvo and campylobacteriosis. Please get in touch with vet to confirm the actual cause of the problem. Vet will also give treatment accordingly. Some dogs have worms as well which shed there eggs in the poop. Ticks which are attached to the rectum of the dog. Dog rub there back on the floor or lick/scratch there back to clean. Which leads to bleeding. De worm you dog regularly and make sure your dog have access to water all the time, this will help him digestion and to pass the poop easily.