ーWhen I was in high school, the rules were pretty strict. We weren't allowed to have hair over our ears.
「高校の時規則がかなり厳しくて、髪の毛が耳にかかってはいけなかった」
to have hair over one's ears で「髪の毛が耳にかかる」と言えます。
関連表現:
「前髪が目にかかる」と言う場合は、次のように言えます。
to have one's bangs over one's eyes
例:
Your hair is in your eyes. I can cut it for you.
「髪が目にかかってるよ。切ってあげようか」
Your hair is in your eyes. で「髪が目にかかる」ことも言えます。
ご参考まで!