Yes. This just happened to my dog tonight, only his whole head was stuck in the pumpkin.
It sounds funny, but they get very scared because they can't see. My dog was running into the walls and furniture. I think he was very frightened until he heard my voice. Then he knew everything would be okay.
That poor deer. Thank God he finally managed to get the pumpkin off his head. After the very same thing happened to my dog, I have a feeling this probably happens more frequently than most of us realize.
Edit: If you have a dog, please be sure you store the plastic Halloween pumpkins out of the reach of your dog. Dogs LOVE chocolate, and if they smell the scent of candy in the pumpkin, (they can smell candy LONG after it has been removed from the pumpkin) they WILL stick their head in it!