Is your dog eating? If so, then there has to be something a bit wrong, because if something is going in, something has to come out the other end! If you think your dog might have chewed something inedible (like a toy, furniture,stick, clothes, etc) there might be an intestinal blockage. Usually that would cause your dog pain, and vomiting most likely. So you would be able to tell your dog was sick.
If he/she hasn't eaten anything, then there will be no pooping. But at the same time, not eating for 3 days is not ok. It might be best to see a vet.
But if you think it's just ordinary constipation, then yes, pumpkin will help a lot. Does her/his food contain enough fibre? A little apple, steamed carrot or cabbage added to the food will often help too.
Do you have 'any' idea why? Did you dog eat something it should not have??
I dont know for sure but I do know that it is safe... Try giving your dog some pumpkin and peanut butter. I mean like canned pumpkin...
Hope this helps!