The MCU input pin has (presumably) protection diodes to both ground and VCC. It’s the diode to VCC that can become a problem when unpowered because the 3V at the MCU pin now has a path through that diode to the VCC net which almost assuredly has a residual path to ground (through the MCU, other unpowered chips, passive networks from VCC to ground, etc.)
If that residual resistance is small it might destroy the MCU pin by exceeding its current rating. If it’s large enough it won’t hurt the MCU but will still be a load on the battery when off, which is not desirable.
Putting a series diode between battery and MCU would protect the MCU against a battery plugged in backwards but do nothing to protect again unwanted current flow during power off (path now being through two diodes instead of one).
An active switch from battery to MCU is probably best bet to solve these problems. The most straightforward approach may be a MOSFET in series:

simulate this circuit – Schematic created using CircuitLab
The gate needs to be asserted high (by a GPIO from the MCU for example) to turn on the FET so the battery can be read. With power off, gate is low, Vgs = 0 and the FET is off.
If the battery can be inserted backwards, a series diode from the battery to the FET may be a good idea.
OOPS - As Chris Stratton pointed out, the single MOSFET won't work. You need two. The pulldown transistor could be a simple NPN:

simulate this circuit
But if all you really care about is protecting against a reversed battery (as your original post indicates) then a simple diode would work. With a Schottky diode (e.g. BAT54) and such a tiny current draw you would only lose a few tenths of a volt in the measurement:

simulate this circuit