Disconnecting the battery will erase the check engine light, use of a scan tool is the preferred method.Yes disconnect battery the light will reset if it comes back on there is a problem that needs to be investigated. A constantly blinking check engine light as you drive is a more serious issue and is a sign that there is a problem that would result in damage to the catalytic converter.
If I may comment -- IF the gas cap is the cause of your light coming on, and you have secured it - then you have no need to be concerned, because the system will eventually correct itself, and you will not be causing any damage since your concern was caused by the loose cap and that is now secure.
HOWEVER -- since you have no scan tool at your immediate disposal -- you don't really know what the code is...so if it is another concern, then obviously testing is in order.
Hopefully for your necessary drive, it was just the cap...and all is well. Good luck, and safe travels.
My 2009 Sedona check engine light just came on. Temp this AM about 20 deg F so thought is might be outside temperature related. I re-installed gas tank cap and next start, light went off. Hope that was it. Will see over next days. Thanks for your thoughts.