It's important to remember that there's no connection between wearing nail polish and getting gas at the dentist. Getting "gas" (nitrous oxide) is a common practice at the dentist, and it's administered to help patients relax during procedures. It's unrelated to nail polish.
If you have any concerns about your dental care, please feel free to discuss them with your dentist.