I am afraid that size of the aquarium is not the problem. You see a Betta is raised in a small container by himself with no other fish in the container with him. He is not aware that other fish are allowed to be with him, you see and so he does not tolerate or play well with others for the most part and most of the others do not play well with him either. It seems that there are a few fish that are peaceful enough to be good tankmates for them and they do not require large tanks. I have Otocinclus catfish with my Bettas and they are in 5 gallon tanks, I know others who have Corydorascatfish with theirs and have 10 gallon tanks. I do know of a couple of instances where folks are brave enough to have a massive community tank and have all types of fish in there and then stick a betta in there too. I do not recommend this at all. Bettas do not do well where they are in a large community. They may live but you have to really watch them as even some small fish are fin nippers and will attack the fins of the Betta. If the fins are nipped even on the tips, it leaves them open to infection and to a Betta finrot and a bacterial infection of the fins in no joke.
So back to your question, You can have a tank the size of the Atlantic Ocean and if you put the wrong type of fish in with your Betta it is not big enough. The type of fish you put in the tank is what determines whether you can put a Betta in there and with most known fish the answer is going to be no. They just are not good community fish. They do make very good fish for the 5 to 10 gallon tanks with some Otos, Cories, some have tried Platys and Swordtails but I have never heard of much success with them, Snails are good.
Of the ones who have had really horrible reactions with the Betta: GOURAMIS OF ANY KIND - they are of the same family as Bettas and they cannot be in the same tank; Barbs, Tetras, the aforementioned Platys and Swordtails, Danios, Rasboras, Mollies, any other fish with a long flowing or simply long fin habit.
Some of the fish listed above are on the list because the Betta will pick on them but please be aware that there are as many on there that will make the Betta the target of their abuse and perhaps even cause his death directly or indirectly by nipping fins and causing a bacterial infection. Remember Bettas are not used to being around other fishes. They will not attack some of the fish who nip them even if they are being annoyed if they do not see them as a threat. Yet they may attack some fish who would not nip them if they mistook them for another Betta because of the length of their fins.
I am sorry to sound so pessimistic but there have been too many bettas put in with other fish who are incompatible and there is disaster on one part or the other. It just works better to put them in a smaller tank with a couple of smaller peaceful little friends.
For what my experience is worth, anything greater than 10 gallons would be adequate. 20 gallons would, in my opinion, be ideal. As has been stated at great length, Bettas are not reliable community fish. However, it is certainly possible, assuming you are willing to monitor and act quickly if the situation goes south.
The first thing you need to do is make sure you can return the betta if it isn't tolerant of other tankmates.
The second step is choosing tankmates that will typically mix with a Betta. Contrary to popular belief, MOST Bettas are aggressive only to conspecifics. In other words, they will be aggressive toward fish that are like them (e.g. bright colors, big fins). Most small tetras make good tankmates for a Betta. Even if the Betta does get cranky, he doesn't have a chance of catching anyone. Hatchetfish also do well, but require a tightly covered aquarium. Corydoras make excellent tankmates for anything that isn't too aggressive.
Platies can be decent tankmates, but are voracious eaters and may not leave room for a timid betta to feed. Swordtails and Mollies tend to be too aggressive for a Betta to handle. Anything larger than that is almost guaranteed to lay waste to your Betta.
The thing to remember with Bettas is that their personality varies greatly from one individual to another--much more so than with other fish. But if you are willing to monitor carefully and face the possibility of returning a few Bettas, I see no reason why they can't make fantastic community fish.
I wouldn't put a Betta with tetras. Most tetras are active and nippy and may harrass the Betta. In fact, the majority of fish would find it hard to resist a Betta's long fins. In my opinion, in most cases, it is not a question of would the Betta harrass the other fish, but would the other fish harrass the Betta. After all, they are slow-moving compared to other fish and have irresistable, long fins.
I would just stick with catfish, and perhaps a snail. Better safe than sorry.
It also depends on a betta's personality. I know a couple of examples of tanks described here that are community tanks with bettas. They get along fine. I had one betta that got on okay with the corys in his tank once he got used to them. My current one loathes them and chases them whenever they dare to swim up too high or cross in front of him.
But yes, I'd avoid tetras and danios because of their social tendencies, and any livebearers with big flowing fins. Barbs are definitely out. And the advice to have a backup plan to take a fish or group of fish back is a good one.
I do agree. Catfish depending on the tank size, Otos for smaller tanks, Cories for 10 gallons or over if you like and Mystery Snails (watch the type or you will have a snail explosion as some kinds of snail do not need 2 to mate) - Mystery Snails are safe. I would if at all possible add the Betta as the last fish in the tank or you will have some fighting over adding fish to "his" house. You must remember Bettas have never been in with other fish in a community setting EVER and do not know how to share. They never learned so they need to feel like they are moving into the territory of others not that the others are entering their territory. If it is already too late for that, try taking the betta out of the tank and rearranging everything in the tank and moving everything to new locations. Then put the new fish in (after they have gone through quarantine - never add fish to a tank without the 14 day quarantine period) and put the betta back in. He will think (with any luck) that he is in a new home.