Advanced LIGO and other ground-based interferometric gravitational-wave detectors use high laser power to minimize shot noise and suspended optics to reduce seismic noise coupling. This can result in an opto-mechanical coupling which can become unstable and saturate the interferometer control systems. The severity of these parametric instabilities scales with circulating laser power and first hindered LIGO operations in 2014. Static thermal tuning and active electrostatic damping have previously been used to control parametric instabilities at lower powers but are insufficient as power is increased. Here we report the first demonstration of dynamic thermal compensation to avoid parametric instability in an Advanced LIGO detector. Annular ring heaters that compensate central heating are used to tune the optical mode away from multiple problematic mirror resonance frequencies. We develop a single-cavity approximation model to simulate the optical beat note frequency during the central heating and ring heating transient. An experiment of dynamic ring heater tuning at the LIGO Livingston detector was carried out at 170 kW circulating power and, in agreement with our model, the third order optical beat note is controlled to avoid instability of the 15 and 15.5 kHz mechanical modes. We project that dynamic thermal compensation with ring heater input conditioning can be used in parallel with acoustic mode dampers to control the optical mode transient and avoid parametric instability of these modes up to Advanced LIGO's design circulating power of 750 kW. The experiment also demonstrates the use of three mode interaction monitoring as a sensor of the cavity geometry, used to maintain the g-factor product to g1g2= 0.829 ÷/- 0.004.