Canned pumpkin helps to firm their stool, so yes you can feed it to your pup when he has diarrhea. Im going through this with my pup now actually... hes acting normal but has had diarrhea for 2 whole days

poor little guy! Last night it had traces of blood around the edges and I ddnt have pumpkin so I gave him some plain white rice. This morning the blood was gone and the stool firmed up a TINY bit. Im going to give him boiled hamburger and more white rice tonight. That should help also.