Yes, 100% a heater is necessary. Most here will tell you a 2.5 is much too small to divide for housing two males. I'm inclined to agree, especially after seeing my male in a ten gallon. I could take him down to 2.5 if I wanted, but any less space than that would be cruel.
Never listen to petco, unless someone starts telling you how you need at least 2.5 gallons, a heater, and thermometer to really have your betta live happily. I work at Pet Supplies Plus and make sure all potential betta owners know this. As far as dividers, if you had a proper sized tank, from what I've heard bettas will get used to each other after a time. However, most will place plenty of plants in between to lessen how much the males see each other. Most seem to agree that you need at least 5 gallons to divide.