Of course, your teacher is saying true. You must have your back muscles quite strengthened and flexible through other postures like katichakrasana, paschmittonasana, halasana, chakrasana, setubandhasana, etc.
I would suggest you to practice sarvangasana that is much better and easier-to-do than shirshasana because for effective results of shirshasana, you must follow certain precautions/ guidelines (like sattvic diet, relaxed state of mind (and never fatigued), five minutes relaxation before posture and 10 minutes relaxation post posture). Initially, you should take the help of wall while doing shirshasana; later on without it, you will be able to do perfectly.
However, take into account your age, weight, b.p. (if high), sugar (if diabetes), spinal flexibility, while doing shirshasana and also during sarvangasana.
If you have more doubts or require more information, kindly feel free to put your questions with your age, weight, gender, disorders (chronic/ acute, if any) to enable me to suggest accordingly.