People who sing along to music while wearing headphones sound terrible because they’ve generally got the music so loud they can’t hear themselves.
The article correctly points out that singers wear in-ear monitors on stage and headphones in a recording studio, and that this is not an issue because they are monitoring the microphone into which they are singing.
The article also points out, correctly, that the way you hear your own voice is different from how everyone else hears it. And it’s correct that the reason is because the sound of your voice travels through bone and the softer tissues of your head.
However, that is in addition to traveling through the air between your mouth and your ears.
The difference in your perception is in the balance of frequencies constituent to your voice, not the fundamental frequency itself. That’s a difference in timbre, not pitch. The article got that dead wrong. I’ll grant that lower frequencies are emphasized, and perhaps that’s why the author says it’s “lower”, but that is conflating timbre with pitch.
Talk to your teacher about why headphones are supposedly bad. It is probably because you can’t hear yourself well.
If you’ve got a mixer or audio interface and a microphone, you could mix the accompaniment with your own voice. That’s how it’s handled on stage and in the studio.
If not, you could always plug one ear with your finger under the headphones, only use one earbud, or use DJ headphones (one sided headphones). Singers sometimes plug one ear when singing in harmony so they hear themselves above the other voices. That technique may work for you as well.