My guy is in a 16 gallon and is happy as can be! He has no trouble reaching the top of the tank and my tank is a taller 'show' tank. If you can, get a 29 long tank instead of a taller 'show' tank though. The more surface area you can get, the better. I didn't know that when I got mine. More surface area = more oxygen for fish.
For mates, I have corydoras catfish and they get along very, very well with my guy. They eat sinking pellets though, so wouldn't eat the same sort of food. I'm sure you'll get other suggestions. My ghost shrimp are also fine with my betta but I've heard of the betta eating the shrimp when it molts.
Every betta is different. Yours may not get along well with others. Sadly, you won't know that until you try but you can help by making sure there are LOTS of plants and hiding space in your tank where everyone can get a little privacy.