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.
The fact that dream deprivation results in psychological disorders indicates quite strongly that dreaming serves a vital function, at least in higher functioning brains (ie: human rather than, say, rat). I have heard the suggestion that dreams are a sort of replay of the days events without our conscious brain restricting the associations made, it's suggested that this allows us to both reinforce those events into our memory and make connections between events that would otherwise be missed.
Would it be useful to pint out that ToE does not suggest that every extant trait exists because it provides and advantage?
Some traits provide an advantage and are selected for, other traits just exist, and get passed on with the selected for ones.
If dreams are a 'necesary' part of brain function in humans, there is no reason to assume that other animals don't also dream. As someone else pointed out, I have seen dogs asleep whimpering and twitching their feet, whilst having rapid eye movements, and cats, and, to a lesser degree (and without much human-audible noise or eye motions) my pet rats too.
I'm familiar with a study that suggested dreams are used by the brain to "solidify" learned behaviors and responses. The study analyzed subjects' abilities to play Tetris (the falling blocks game, we're all familiar with it, right?) before and after periods of natural sleep. Those that had dreams featuring motifs of falling blocks scored measurably higher in Tetris performance the next day.
As a mechanism for the solidification and reinforcement of learned behavior, then, there's no reason to assume that animal brains don't also employ the same technique. As others have said, dogs appear to "chase" while sleeping, and studies confirm that animals experience sleeping brain states very similar to humans in REM sleep.
I think it's safe to say that animals dream, but that they dream about pretty much the same things they do awake, i.e. chase stuff or get chased, eat, and mate.
I read an interesting article recently (sadly in print, so no link) that suggested that what happens during a dream is the biological equivalent of your computer defragmenting. Unnecessary data is removed, and what's left is organized a little.