If I become a member of the UN and I change my mind, would I be able to leave the UN?
Yes. Once you are in the UN, when you go to the United Nations section from your nations screen, there will be a resign option.
Unlike applying, resignation takes place immediately. You click the button, it says something insulting about the UN in general, and you're out.