If it was extremely planted it would be fine, but I would suggest something so big. besides you can't see it and track it as well and it would be harder to feed.
I find that 5-10 gallons works great for them, especially when planted so that they can hide when they want and not feel like they're out in open waters. It's not so much the tank size but how much open water there is. A Betta could be nervous in a very bare 10 gallon just as much as they'd be nervous in a 29+ that's not planted. So the more plants and decor, the better.