I've rented tuxes in the past but as a frequent cruiser, I found that buying one would pay for itself in a couple of cruises. You can get them more reasonably priced than you might imagine, especially when there is a sale. Having a tux, I've used it for other ocassions on shore, like a New Year's Eve party.
As far as the ladies, it is quite easy to pick up a top that goes nice with a long dark skirt that will do the trick. I'm sure the ladies here have lots of suggestions on mixing and matching. My wife picks up those on sale too.