On UCLA website, the school says that “Applicants whose first language or language of instruction for the last three years is not English are required to take the TOEFL.” What if the student’s first language is not English but the primary language of instruction is English from primary school to high school? Is TOEFL still required?
You answered your own question.
If the language of instruction for the HS is English, then you don’t need to take the TOEFL.
If the language of instruction for the primary school is English, but the language of instruction of the secondary school is not English, and English is not your primary language, then you would need TOEFL
But be aware that different colleges have different rules on TOEFL.