There's really no law that says a used car dealer has to offer a grace period for returning the used car after purchase but most used car dealers that are legit will allow you from 1 to 3 days to return the car to the dealership after purchase if you're not satisfied with the car.
The dealership doesn't have to take the car back but most will take the used car back and allow you to purchase a different car from either them or someone else.