Is it okay to share a tex template from a journal for teaching purposes?
Several journals have made their LaTeX classes available on CTAN: I suggest you to pick one of them.

Example journal classes available on CTAN are:


amsart
IEEEtran
elsarticle


As Federico Poloni rightly suggests, check anyway the license of the package you want to use, which is written on the CTAN page of the package.