Sometimes I wake up to the moaning of our dog - 2 dogs are sleeping in our bedroom. It is usually Tisoy, the 8-year old spitz who would be moaning and groaning while sleeping. I would wake him up and he would look surprised. But obviously he was having a nightmare. I had consulted the vet about it and she said that she also believes that dogs experience dreams and also nightmares. And for a precaution like humans, we should also waken the dog to stop the nightmare that he is experiencing.
I haven't seen my dog be disturbed by a nightmare but I have heard that dogs also dream. One can tell if their legs are moving or sometimes if they're whining. It seems that it's the same with humans who go on about their days and then dream about their waking lives. A good friend of mine told me about her dog that she sometimes watches when it's dreaming. She said it's like in the dream, her puppy is running because of the movement of the legs.