What opamp configuration to choose to measure 1kHz square wave with 1MHz signal modulated on it
You could rig up a low pass filter with a corner of, say, 30KHz, and take over 24dB off of the 1MHz signal.  Add another pole if that's not good enough.  The 1KHz waveform should be relatively unaffected and can be measured directly.