I don't know whether there's any "advantage" to having dreams, but it's pretty well known that depriving people of dreamtime (by waking them whenever they enter REM sleep) makes them very crazy after a few days. Stalin's secret police used this technique a lot as a non-destructive torture. I have certainly seen dogs who appear to be dreaming - making noises, "running" in their sleep, etc. I'm sure some Google searching would also unearth some research on whether dogs, chimps, or whatever have REM sleep, and which parts of their brains are active while they do.
Speaking from ignorance, I would find it surprising that the "higher functions" of the brain would completely shut down just because you're asleep - I'd think that dreams are to be
expected in critters with enough frontal lobe to make the concept of "dream" meaningful.