will bettas do okay with rainbowfish?
This would probably work. Rainbows don't tend to be very aggressive but I've heard one report of nippy rainbows. They were M. doublayi. Try some M. praecox. They are pretty and only 2 inches long which is better if you don't have a huge tank.
Do you already have a betta? If so, try him out in the community tank. I have kept bettas with gouramis before with no issues, but that was a long time ago. Recently they have been dosing dwarf gouramis with huge amounts of hormones to turn the females into males because they are more colourful. I suspect that all that testosterone makes them act like a male with too much testosterone.
I currently have one male betta and three females in my community tank. They are going just fine. If you keep females in the same tank it should be a big one with plants. He occasionally shoos one of the females away from 'his' floating plants but his attention span is pretty short - he only chases for 5 or 6 inches, then gets distracted by something else. Mostly they get along with each other. You do have to be prepared to separate the male and females if they breed, read up on this before you decide to keep male and female bettas together.
Other than that, male guppies may be an issue due to their finnage but again, it depends on the betta. I saw a betta in a small tank with about 30 male guppies in the LFS and he didn't bat an eye at any of them.
One thing that you need to be very careful about if you have a betta in a community tank is to avoid any fin nippers or aggressive fish. Tiger barbs, red tailed sharks and the like are definite no nos and can tear up a betta in minutes.
Oh, and only one male betta to a tank, but I'm sure you knew that!