As long as you put a divider in, they should be fine. You can fit more than 2 bettas in a 20 gl tank, though....
As for other companions, bettas are very aggressive. Some people say you could put a betta with anything tropical that doesnt have long finnage, but I have seen bettas nibbling on even the strangest of things, including a snail, hanging on the glass....
I even found one of my betta fry eating some smaller fry. It looked kind of funny actually, seing a 1/2 inch betta eating a 1/4 inch betta. All I could see was the tail in his mouth!

No mercy, not even from siblings!