Nothing in this chapter shall be construed to prevent a regularly matriculated student undertaking a course of professional instruction in an approved medical school, or to prevent a foreign medical student who is enrolled in an approved medical school or clinical training program in this state, or to prevent students enrolled in a program of supervised clinical training under the direction of an approved medical school pursuant to Section 2104, from engaging in the practice of medicine whenever and wherever prescribed as a part of his or her course of study.