It's really simple: a multimeter cannot be used to measure resistance of anything that is a voltage source.
To measure battery resistance, a battery diagnostic tool must be used.
A multimeter measures resistance by connecting a current source between the input terminals, and the resistance is just a scaled value of the voltage measured on the input. Obviously, if what's measured isn't a resistor but a battery, the battery voltage will appear as additional resistance.
simulate this circuit – Schematic created using CircuitLab
The multimeter scales the voltage reading so that it appears directly in units of resistance, for convenience.
When a battery's "resistance" is measured that way, obviously the battery voltage adds up and confounds the reading:
simulate this circuit
The resistance reads 5.005 kohm, but 5.000kohm of that is caused by battery voltage.
Of course this is just an example - your multimeter's resistance mode test current will depend on the measurement range, and generally is not 1mA.
Now, if you know exactly what current the multimeter applies at various resistance ranges, you could figure out what is the scaling from input voltage to resistance, and subtract the part of displayed resistance that's caused by the battery voltage. What's left would be the battery ESR. Most hand-held multimeters would not have enough resolution to provide usable results that way, though.
Also, the current sources in multimeters have fairly limited compliance voltage ranges. That means that unless the battery has very low voltage - say 1V or less - the current source won’t work, and the “resistance” will be only a scaled battery voltage, independent of any battery resistance.