It really largely depends on the betta. Most will do just fine with Mollies and Swordtails, and some will be fine with Guppies (though some see the males as rival bettas because of the colourful tail and attack them) so all you can really do is try and judge if the betta seems too aggressive for these fish. For instance, I've had bettas with Guppies and Mollies with no problem, but I've also had a betta that would attack anything, be it a Molly or an Apple Snail. Personally, I'm no longer a fan of bettas in community tanks because of compatibility issues beyond aggression problems (bettas do best in with 80+ degree water and little water movement and most other fish like some current and temperatures from 74-78 degrees F), but it can and often does work well with all parties involved thriving. If you want to, try it and see, but be ready to take the betta out and have him in his own tank if it doesn't work out.
Good luck!