I understand that you received this little guy as a gift and didn't expect to be investing time and money into a gift lol. However, I am glad that you are doing what needs to be done for him. I do have a few notes and suggestions.
First, bettas are insectivores. This means the myth that they can live off plant roots is false. They may nibble at microorganisms, but there would never be enough of those to sustain a healthy betta.
Next, you absolutely must use water conditioner each and every time you change the water in the tank. Straight tap water can kill a betta or any fish for that matter due to the chlorine and chloramine.
With a 2 gallon tank it is imperative that you do a water change of a minimum 50% every week, also ensuring that the temperature of the water added matches that of the original tank water.
One more note, be sure to unplug the heater every time you do a water change, not doing so will break the heater and cause it to quit working.