The structure is usually: if + past simple >> + would + infinitive.
When if is followed by the verb be, it is grammatically correct to say if I were, if he were, if she were and if it were. However, it is also common to hear these structures with was, especially in the he/she form.
If I were you, I wouldn't mention it.
If she was prime minister, she would invest more money in schools.