Measuring depolarizations over the membrane
It is extremely important where you put your electrode when measuring such delicate structures as dendrites (which is when you want to compare voltage changes between two parts of a neuron). That is why you put your electrode inside the dendrite. Each recording electrode has its own ground that goes inside the bath, i.e. outside the neural tissue. Alternatively, you can observe fluorescence changes of a calcium or voltage dependent indicator that you have introduced inside them.

https://www.janelia.org/sites/default/files/Labs/Spruston%20Lab/Stuart_Spruston_2015.pdf