I would say yes and no. That is, you have to be a very good pianist -- but you have to be careful to define quite accurately what you mean by very good. It does not mean, for instance, that the teacher will be noted for a great deal of concertizing, or even that the teacher will be able to astonish you with the clarity and brilliance of their interpretation and playing. It does mean that the teacher will play with excellent technique, however. It also means that the teacher can see inadequate technique in a student -- but again a warning: this does not mean that the teacher takes a monkey see, monkey do approach to technique, because especially in more difficult passages it may be that one pianist's most effective technique is quite different from another's. He or shee has to be able to figure what is going to work for you. The teacher should be able to understand what a composer's intentions were in a piece, and help you express them, as well as being able to help you understand what your intentions and interpretatons are and help you express those as well. Above all, perhaps, the teacher should be able to understand you -- both in terms of physical talent and in temrs of musical though (for lack of a better term) and help you get the most out of that.
It is perhaps helpful to note that both in the world of opera and of ballet the best teachers and coaches are not, usually, the best singers or dancers. They are good, yes -- but what they are good at is finding out what the Prices and Baryshnikovs and Flemings and Vilellas of the world are good at, and helping them become the very best they can be.