You can stay
It most certainly was. The law relating to the appointment of heads and deputies is set out in Schedule 16 of the School Standards and Framework Act 1998.
The composition of an appointing panel is a matter for governors to decide and no governors should be excluded from making that deision. There is no rule debarring teacher-governors from sitting on appointing panels: some governing bodies welcome their participation, others decide against.
The only relevant rules are those requiring a declaration of interest. No governor should take part in a process where she or he has a direct interest in the outcome. This may be defined, in this instance, as an interest which is greater than that of the generality of teachers. Thus, if a teacher-governor stood to gain, by promotion for example, if one person was appointed rather than another, then she or he should withdraw from all discussions relating to the appointment and should not sit on the panel.