National Defense Act Article 34

When friendly nations dispatch forces or military personnel in the ROC territories, their rights and obligations, and other relevant matters shall be regulated by treaties or agreements between both sides. Foreign nationals, upon approval granted by the MND and the Ministry of Interior, may serve in the Republic of China Armed Forces.
中文原文 國防法第34條
友好國家派遣在中華民國領域內之軍隊或軍人,其權利義務及相關事宜,應以條約或協定定之。
外國人得經國防部及內政部之許可,於中華民國軍隊服勤。

English translation for reference only; the Chinese text prevails. Not legal advice.