As someone else mentioned, Bettas and livebearers like the opposite types of water... So while a vigorous and healthy fish COULD do it, it really is not in their best interest.
That said, I have in a pinch put one of my male Bettas (Gothie the black HM) in the Mollie community tank (because of lack of other options at the time) and he was fine for a couple days. But he is on the passive side, and I worried that my super aggressive sailfin lyretail balloon Mollie male (Kinglet) but the Mollie only showed minimal interest as he was to busy chasing the girl mollies, and the Berta just set up camp in my water hyacinth roots, occasionally flaring at a super pregnant guppy female who was looking at the plant as a birthing site. It wasn't even real aggression on the Bettas part, he just showed off his fins and gill plates for a second, investigated her, and then went back to the plant.
The INDIVIDUAL personalities of the fish are the most
Important. If your Betta is SUPER territorial and aggressive in disposition it probably isn't a smart idea. If he is laid back with a calm nature and a lazy streak... He probably won't care much who his company is.
They are kind of like people, some are more socially inclined than others... But you also have to remember that nature designed them to be anti-social, and humans selectively bred them to AMPLIFY that quality in order to make them little Gladiators and Gladiatrixs.
I'd worry about what kind of water makes them happiest (as their bodies are designed to work best in a certain kid of envrionment) before I started to worry who their personalities work with!
I mean we don't expect salt water fish to thrive in fresh water set ups (I hope) the PH of the water is just as important. A soft water fish is not going to thrive in a hard water set up or vice versa.