want intransitive verb
2: to have or feel need
// never wants for friends
- M-W
That is, the version in the title suggests that having a teacher is the norm, and asks about the situation where one was needed but wasn’t available. It’s an archaic use of the word want, though.
All three variants you propose carry something of an opposite sense to that: the underlying norm implied is not having such a teacher. The first two (“Have you ever ...”, “Did you ever ...”) talk about the past while the last (“Do you ...”) is an enquiry in the present tense.
Each of the 4 variants is grammatical and (in its own register) a fairly natural expression.