The question is, is it permissible to make an oath to commit an action that would violate the law of the country he (the person who took the oath) lives in?
Although it is hypothetical Question. But there may be situations which might turn out to be a practical problem for a resident of a Non-Muslim country.
Here are few scenarios:- First of all, as a Muslim one should know the laws of the land he/she intend to move to. If the laws are in conflict with Islamic Sharia'a, in its practice, there, then abstain from moving there.
If he/she later finds out that some laws are a hindrance in the practice of sharia'a (which is very unlikely) then should move to another country of comfort.
Otherwise, it is imperative in sharia'a to abide by the laws of a country of residence as a good citizen or resident. There are several ahadith available on the topic which may be resorted to for further enlightenment.