I tried this with a female betta in a 30-gallon community tank with a pair of rams. I have a lot of plants for hiding and thought a female would be less likely to get in a fight. The one I picked wasn't the one...she constantly had shredded fins...I think the male GBR would win against the betta, but the betta would win against the female ram...as the female ram would always dart away quickly when the betta came around. In the end, I re-homed the betta. I got mine from a plcae that has the bettas in single bowls, so I had no idea how aggressive or not she would be. I have seen female bettas for sale when they have a lot of them all in one tank together to choose from. Maybe if you had a LFS with that setup you could watch and pick out a less aggressive one?
30 gallon planted - Fish & Shrimp - Pair of German Blue Rams, albino & calico bristlenose plecos, school of emerald dwarf rasboras, school of neon tetras, honey gold gourami, amano shrimp, and a cherry shrimp colony. Plants - Dwarf baby tears, vals, guppy grass, moss, narrow-leafed java fern, amazon swords, anubias, and many unknown broadleaf plants (foreground)