The trustee, trustees or board of education of any school district may permit any teacher having had at least five years service in the school or schools of said district to apply for and receive a leave of absence for a period not to exceed two years for teaching in the schools of a foreign country, other states of the United States or any of its territories or in any other school district within this state provided such foreign country, other state or territory or other school district shall have agreed to furnish a teacher of corresponding rank or school level to fulfill the duties of the said teacher on leave of absence. During the period of said leave of absence the said teacher shall receive from the school district the same compensation that he would have received had he been present and teaching in a school of the district. Such leave of absence shall not in any way affect the retirement rights of said teacher as a member of a retirement system and the period of the aforesaid leave of absence shall be credited to the total years of service of said member in the same manner and for all purposes as if he had not been granted said leave of absence and had been present within the district engaged in actual teaching service. Notwithstanding any of the provisions of this chapter, when the qualifications of the teacher from the foreign country, other state or territory or other school district have been approved by the commissioner of education, he shall be legally entitled to render instructional service in any public school in this state and a permit for a period not to exceed two years for such service shall be issued by the commissioner of education without the payment of fee. Any school district employing a teacher under this section may supplement the salary received from the foreign country, other state or territory or other school district by said teacher.