my 4 month old puppy poopooed blood and rubbed his but on the floor right after
My puppy poopooed blood but it was not diarrhea. It was mushy with a little blood and right after he rubbed his butt.
His behavior is the same as always playful he will still eat, and he has a cough.
Blood in his poop is a sign of irritation in his intestines/colon. This could be be due to worms, a change in diet, stress - various different things.
The fact that he rubbed his butt on the floor, could suggest worms, the cough too. But only your veterinarian can really make an accurate diagnosis.
If your puppy hasn't been regularly dewormed, your vet can do this for you and I would strongly suggest that you take your pup for a check up.
Best of luck with him.