We report measurements of the thermal Hall effect in single crystals of both pristine and isotopically substituted strontium titanate. We discovered a 2 orders of magnitude difference in the thermal Hall conductivity between (SrTiO3)-O-16 and O-18-enriched (SrTiO3)-O-18 samples. In most temperature ranges, the magnitude of thermal Hall conductivity (rc xy ) in (SrTiO3)-O-18 is proportional to the magnitude of the longitudinal thermal conductivity which suggests a phonon-mediated thermal Hall effect. However, they deviate in the temperature of their maxima, and the thermal Hall angle ratio (vertical bar kappa(xy)/kappa(xx)vertical bar) shows anomalously decreasing behavior below the ferroelectric Curie temperature T-c similar to 25 K. This observation suggests a new underlying mechanism, as the conventional scenario cannot explain such differences within the slight change in phonon spectrum. Notably, the difference in magnitude of thermal Hall conductivity and rapidly decreasing thermal Hall angle ratio in (SrTiO3)-O-18 is correlated with the strength of quantum critical fluctuations in this displacive ferroelectric. This relation points to a link between the quantum critical physics of strontium titanate and its thermal Hall effect, a possible clue to explain this example of an exotic phenomenon in nonmagnetic insulating systems.