Does anyone out there know of a pleasant town in the mountains within a few hours of Quito where my girlfriend and I can spend some time. Preferrably, on a lake or river, few tourists, and modestly priced cabanas?
I'm not sure if it's what you're looking for, but Pululahua Crater (next to Mitad del Mundo) is nice. Alternatively, you could head up to the hot springs at Papallacta

Or, if you're going to go all the way to Riobamba, head east to Salinas de Guaranda. Amazing small town.

There's always Mindo, although it's barely tourist-free! I had a lovely stay there though, very relaxing with world-class birdwatching if that's your thing. As recommended by fluffy_bunny Papallacta has lovely hot springs (it's often shrouded in cloud though) and is on the way to the Oriente if you're planning to go to Cuyabeno. You also have some pretty little villages on the Quilotoa loop out of Latacunga. All of these places are very different in character. Mindo is possibly the closest to a verdant wildlife-rich mountain village I can think of among these suggestions.
I'd hardly call Riobamba a 'pleasant town in the mountains'. It's a large-ish city surrounded by pretty volcanos, but I don't think it's what you have in mind.
Agreed, Riobamba and Latacunga are cities near the mountains, not pleasant towns in the mountains. There are really nice places to spend time near Otovalo in the north, but mostly in nearby smaller towns like San Pablo del Lago or Cotocachi. Not the sort of places you go to unless you have a specific hostel/hotel in mind.

Peguche is a lovely little town near Otavalo but you might find tourists there but it has a lovely waterfall which people like to go and sit by and it is close enough to Otavalo should you want to do something more but not stay in Otavalo itself. Then there are Las Lagunas in the same Imbabura Province which has accommodation on its shores and which might be nice to chill out for a few days and is still near Otavalo.
Then of course there are the towns on the Quilitoa Loop and the Lake itself all which have accommodation of varying comforts and prices.
All are well worth investigating and good places to unwind.

It also depends on how many "a few hours" is. We loved Chugchilan, near Quilotoa, but it takes more like 3-4 hours to get there. Also, there's no real river in Chugchilan. Nice town, nice people though. We stayed at Black Sheep Inn, but there are less expensive places to stay. Not sure I saw any cabanas though--mostly hostels and small hotels. Beautiful mountain spot.

I second three of the recommendations above:
Papallacta (gorgeous high altitude vegetation, close (an hour?) to Quito
Chugchilan and the Black Sheep Inn, (4 hours?)also gorgeous and high altitude, plus indigenous culture and the volcano hike
Peguche (near Otavalo, maybe 2 hours away from Quito?) great because you can visit Otavalo and then leave most of the tourists and have a more relaxing experience