An ideal battery or cell has no internal resistance, ie., r = 0.
So there is no voltage drop across the materials in side the battery, when it is connected in a circuit with some external elements.
When a battery is not connected in a circuit or it is open, then there is no current passing through it. So the emf is the potential difference observed by measurement.
When a battery has an internal resistance r, and it is connected through a circuit, there is a current I flowing in the circuit. Hence, there is a voltage drop across this internal resistance. So P.d. across battery = emf - r I.