In your case, the patent applicant/patentee must be a school, otherwise the school will not reimburse the expenses. You and your teacher are both inventors, and inventors have no priority. The first inventor is the same as the last inventor.
It's just that our official standard thought will take it for granted that important people are given priority.