Reducing noise on a voltage reference
Most of the noise (perhaps 1-2mVp-p) will be due to the reference, so putting a capacitor on the op-amp non-inverting input (with a series resistor in the case of the TL071) makes some sense. 100nF with a 20K series resistor (about 22-23K equivalent total) will give you a cutoff frequency of around 71Hz if I did the math right. Similar to @WhatRoughBeast's comment but with added series resistance.

On the other hand if you use a lower noise reference such as an LM4040-2.048 or -2.5 which has something like 250uVp-p noise typically, the capacitor and resistor may not be necessary, since the amplifier is contributing significantly.