that's what I have
I have a 50 watt submersible heater for my betta breeding tank. It was only about $17. It's really important when you're heating a small tank to do it slowly though. For instance if you want your fish at 80F and it's currently at 72F you don't just want to quick it way up all at once. You just kick it up a little at a time, a couple of degrees a day maybe until you have it where you want it. Otherwise those little tanks can heat up faster than you expect them to and cook your little fishies.
Also even though bettas like fairly shallow water, it's important for safety reasons to have the water at least deep enough for the heater's minimum water level for safety reasons. This is usually about 6 or 7 inches.