My 2.5 gallon tank filter went out, so I had to put my betta fish in a cup for the night until the store opens. Will he live when his filter went out over night?
As long as air can get into the cup and the betta can't jump out of it, yes, the betta should be fine. They are kept in small cups for much longer periods than "overnight" in pet and fish stores, after all. However, as the cup has no more filtration than the tank, there was absolutely no need to remove the betta from the tank unless the water in the tank was already toxic (in which case, you need more help than just a new filter, anyway).
The larger volume of water will help dilute toxins produced by the fish (via waste production and respiration), as well as giving the fish more space to swim and relax as compared to the stressful environment of a small cup. In fact, you should be using a minimum of 5 gallons for your fish, to provide more of these benefits.
You can find more information on tank size and why more space is better (whether it be a larger tank in general, or just the original tank compared to the tiny cup) at FishLab.
Why would you take him out of the aquarium? His only risk is low temperature and a cup will cool much faster than a larger vessel. When I raised bettas ,I kept males in separate 1 L plastic bags suspended in a large heated aquarium ; no filters , no aeration ( they breath air directly )- no problem. In the wild ,one author wrote , " A betta is at home in a water filled water buffalo foot print in the mud. " . Cold is not a problem in their native home.