Congratulation on your new fish!
Do you mean one of these?
If so, you could keep it as a holding tank, but can I please ask you to reconsider?
I know a lot of people have kept bettas in a half gallon. They survive, but it is not ideal for them - they are tropical fish and appreciate more space. Smaller water volumes are tricky and require more care. For example, it isn't safe to put a heater in a half gallon - the temperature will fluctuate too much.
If you absolutely must keep him in a half gallon, be sure you pick a water purifier that neutralizes *ammonia* as well as chlorine and chloramine, and you will need to do frequent (every other day) water changes. You will want to keep your room at a consistent temperature, preferably 72+ degrees - if your room temperature fluctuates between 68 and 72 like most people's, that is too cold.