It is a iffy situation.
I keep a male betta in a community tank ( plecos, platies, guppies, cherry shrimp) with no problem, and have done so for almost 3 years now.
Crazy ( the name of the betta, as he flares at rams horn snails) is laid back for a male betta.
It is really something that has to be figured out thru trail and error, as every male betta is different.