Multifunctional properties in quantum systems require an interaction between different degrees of freedom. As such, spin-phonon coupling emerges as an ideal mechanism to tune multiferroicity, magnetism, and the magnetoelectric response. In this Letter, we demonstrate and explain, based on theoretical and experimental analyses, an unusual manifestation of spin-phonon coupling, i.e., prevention of a ferroelastic structural transition, and locking of the high-temperature $R\overline{3}m$ phase in a magnetically frustrated perovskitelike oxide ${\mathrm{Ba}}_{2}{\mathrm{NiTeO}}_{6}$. We present ${\mathrm{Ba}}_{2}{\mathrm{NiTeO}}_{6}$ as a prototype example among its family where a long-range antiferromagnetic structure couples with a low-frequency ${E}_{g}$ mode (at $\ensuremath{\sim}55\phantom{\rule{0.28em}{0ex}}{\mathrm{cm}}^{\ensuremath{-}1}$) that exhibits a large anharmonicity. Our findings establish that spin-phonon coupling clearly suppresses the phonon anharmonicity, preventing the structural phase transition from the $R\overline{3}m$ to the $C2/m$ phase in ${\mathrm{Ba}}_{2}{\mathrm{NiTeO}}_{6}$.