I understand that airlines in the U.S. are legally required to offer
free cancellations within 24 hours of booking.
We have discussed this recently. The conclusion is that both foreign and US-based airlines are required to offer free cancellation within 24 hours of booking (if booked longer than 7 days in advance) for flights into, or from the USA.
Additionally, the US-based airlines are required to offer this even on flights outside the USA (i.e. those which do not include the USA).
- 24 hour grace period works for ALL air travel into the USA, or out of USA (as long as the flight departs more than 7 days later);
- 24 hour grace period works for ALL air travel on US-based airlines, even if the itinerary does not include any US airports (same 7-day restriction).
This means the operator you spoke to was wrong. If you encounter this situation, it is important to proceed with cancellation, so it is timely recorded (and refuse to "call back tomorrow"), and then follow-up in writing with the billing/refund department.
Note 1: some airlines are excluded from this requirement, but it is unlikely you'd be ever flying on those.
Note 2: technically the airlines could offer a free 24 hour "reservation hold" for the ticket instead of offering free cancellation to satisfy the DOT rules, but I'm not aware of any airline which is doing so (and business-wise it makes little sense to do so, as this is very easy to abuse: one can easily keep the whole plane "booked" this way until a week from departure).
The DOT regulation is here.