As someone who builds wheels as a large part of my current profession, I would have to say that yes, rims are important - but they're only part of several factors that determine whether or not your wheels are good.
There are also lots of factors in the grade of a wheel!
The grade of wheel build is extremely important. I'd rather ride a masterfully built wheel made with $80 in components than a lazily built wheel made with $500 in components.
Prep compound used in the wheel build is important (Spoke prep, grease,
nothing, etc)
Choice of spokes can have an effect on durability, of course. As can the choice of spoke nipples!
The choice of hub can have contributing factors, naturally.
Just like with your bicycle, you can have high quality parts on most of the bike, but you can be plagued by a weak link component or by poor assembly. Wheels are just the same.
And I personally believe that also just like bicycles, there is a progression in price levels:
Just as there are cheap junk bicycles, or bicycle shaped objects, there are also cheap junk rims (rim shaped objects)
It doesn't take a lot of money to get out of that category. Just like with bikes, spending a little more to get something that's not junk gives you perfectly serviceable product without breaking the bank.
Now, nicer rims may build up straighter, be stronger and lighter, and have nice features like MSW, wear indicators, etc, but a decent entry level double walled rim is quite acceptable for most moderate use. Never hurts to buy exotic kit if you have the inclination and the cash though