You could definitely keep a male betta in a community tank with the right tank mates, and the right tank size, just not female bettas. You could keep them with oto's, various small tetras, snails, small shrimp, plecos, cories, just anything that doesn't have long flowy fins/super colorful. Also nothing super fast like danios, bettas are slowed down because of their long fins and they are prone to getting fin nipped by faster more active fish.