Males and females cannot be in the same tank, you're correct. Only for breeding purposes, not for living.
Males can certainly live in a divided tank! I was sceptical for a while and thinking, "oh, if one gets sick then the whole tank is infected" but having a good supply of IAL and salt and other meds is essential to ensure that tank health is kept up.
Some people get colored plastic mesh to make their dividers so the fish cannot see each other. I made mine with clear mesh so they can see each other, with enough plants and space in the water they can guard their side of the wall and go live happily.
Mine have been in their divided tank now for about 2-3 weeks. They still guard and flare but my VT was a boredom tail nipper and since putting him in the divided tank his tail is growing back at an alarming, but welcomed, rate!
And I have never seen such big bubble nests. Dividing a tank lets them be bettas while also keeping them safe. :)