Is this adjustment to an rms calculation valid? I want to calculate the RMS AC value of a signal made up of several thousand readings every second. The processor that I am using doesn't have enough memory to store a whole second of data, so I want to calculate it the sum of squares the fly.
This is the normal formula to calculate the RMS AC value, where you have to know the mean for the whole second before you can calculate the RMS:

ac_rms = sqrt (sum(square(reading-mean)) / n)

Would I get the same result if I instead use the mean from the previous second, and then apply a correction afterwards?

ac_rms = sqrt (sum(square(reading-prev_mean)) / n) - abs(mean - prev_mean)
You're looking to compute the rolling standard deviation (i.e., a streaming/online algorithm for the standard deviation).  The standard method is to use Welford's method, or a variation.
For the standard deviation, see https://jonisalonen.com/2014/efficient-and-accurate-rolling-standard-deviation/.  This is a minor adjustment to Welford's method (which computes the running variance) to reflect that you want the standard deviation rather than the variance.  See also https://en.wikipedia.org/wiki/Algorithms_for_calculating_variance.