Stable LDO voltage when Vin goes down momentarily
The capacitor needs to be on the input of the LDO so that the LDO keeps operating when the input voltage drops out. You will also need a diode between the battery pack and the capacitor; as @DKNguyen says you can construct an "ideal" diode using a PMOS transistor.

As @Big6 mentioned, you almost certainly need the voltage on the input to the LDO to stay above 3.6V or so if you want the LDO to function properly. It's not obvious how you will do this if your battery voltage really falls to 3.0V.

Even worse, you will need to maintain a significantly higher voltage on the capacitor if you expect to operate through a loss of input voltage for 1s or more. You may need a relatively large capacitor.

At the end of the day, you may be better off replacing the LDO with a buck/boost switching regulator that can provide 3.3V as the input ranges from 2V to 7V.