Hi, if you're going to start off small with a 2g you do not need a filter. A filter in a tank under 5g is just moving water around- it still needs to be cleaned twice a week. May I suggest getting the 5 gallon? Then with a carbon-less filter you can allow it to cycle and then only need to change water once a week! I have never looked back on that decision.
As for a heater, yes you absolutely need one. Bettas come from tropical waters and therefore do best and live the longest in a warm environment. Ideal tempetature is between 78-81F. I found my boys most active at 80-81F.
For a small tank a lot of people go for the preset 7 and 10 watt heaters. While I would not recommend the 7 watt betta pad (the circular pad one) I would only suggest picking up the 10w if you have the money to upgrade within a year. A 25 watt heater is adjustable and lasts a lot longer. Also, if you decided to get the 5g the heater is transferrable (whereas the 10w can only handle up to about 3 g and even then it struggles to keep a stable temp).
I have had success with a 25w heater in a plastic 2.5 gallon kritter keeper, so it does not melt the plastic, just to be safe, keep the glass tube f the heater OFF contact with the tank wall.
Good luck!! They are addictive little interactive pets, which is why I recommended the 5g (which is the smallest allowable tank which can be divided) and the higher watt heater.