« J'habite Paris » and « J'habite à Paris » are interchangeable. They convey the same meaning. You can confidently use both, and you'll probably hear both.
Please note that you *cannot* say « J'habite France ». This would *not* be correct. You have to say « J'habite la France » or « J'habite en France ».
Let's have a look at your question.
J'ai lu en livre de Popova -Kazakova que J'habite Paris (ou l'autre ville)
→ J'ai lu dans un livre de Popova-Kazakova la structure « J'habite Paris » (ou une autre ville)
et notre ex- professeur de francais nous dirait comme ca.
→ et notre ex-professeur de français dirait la même chose.
If your professor was a female, you'd better say « professeure ». See the comment below.
Mais maintenant je notice que notre nouvelle professeur dit "J'habite a Paris".
→ Mais maintenant, je note que notre nouvelle professeure dit : « J'habite à Paris ».
If your professor is a woman, you can :
- either write « notre nouveau professeur » (stressing professorship rather than gender),
- or write « notre nouvelle professeure » (using the regular feminine ending).
The first option is a tad old fashioned and I recommend the second one.