The best solution is to simply get a larger container. Generally, as long as you can submerge the heater up to the water line, it should be ok--but you should still monitor the temperature on an aquarium in which you are using a device that is not rated for the size of your tank.
The mini heaters are not adjustable, nor do they keep the temperature stable. If the temperature in the room changes, the temperature of your tank will still change. If your room is particularly cold--70-75 degrees, the heater will not heat up the water enough to get into the range of temperatures bettas prefer. They also are not very durable, and are generally cheaply made, ime.
I only recommend adjustable heaters with a thermostat, these are only a few dollars more and just a little bigger, but are much more useful and safer for your betta. If you cannot afford to upgrade your fishtank right now but want to give your fish more space, give yourself relief from constant water changing, and want to safely heat the water, I suggest getting a 2-4 gallon rubbermaid or sterilite plastic storage bin, they are only about $2-4 bucks, and come in clear plastic. They are safe to heat, and though you need to keep doing water changes, you will have to do them a little less often with a larger container.