Do not take it to the dealer unless you're a sucker.
Find an Autozone nearby (if you don't have any, call around, other chains might have this too) and ask them to scan the code. Autozones will do this for free hoping that if the code suggests a part needs to be replaced, that you'll purchase it from them. Great marketing, and super handy for people in the pickle you're in.
You shouldn't have to worry about the light being on at the time you go to the dealership, the last code is usually stored and can be retrieved.
This all assumes that your car is 1996 or newer, meaning it is equipped with an OBD-II port. If it's pre 96 but post 80s, it might be EECIV and you'll have to schlump it into the dealer. If it's pre THAT, then... drop it off at the Henry Ford museum and get a new car.