A potentiometer is preferred to measure the emf of a battery, as it gives a more accurate result. This is because a potentiometer uses the null method to measure emf and it hardly draws any current from the primary circuit.
When a voltmeter is used in the circuit, its equivalent resistance is connected parallel to some element of the circuit. This changes the overall current in the circuit and, hence, the potential difference to be measured also changes. The error can be minimised if the equivalent resistance of the voltmeter is increased. However, we also need to keep in mind the heat dissipated due to high resistance while deciding the value of resistance of the voltmeter.
Hence a potentiometer is preferred.