How to calculate membrane potentials?
Your textbook description is correct. Recall the principle of potentiometry, the potential difference is measured when there is no current flowing in the system. This is true under ideal conditions. Do you recall the pH meter? What is the electrode made of? It is made of glass, do you feel that current can flow across glass when you are measuring pH of your solution?
BTW, the working of the glass electrode puzzled electrochemists for ages and the still do not know how it works exactly. So if you are confused, welcome to the club.
You should rather ask how do high impedance voltmeters work? Such voltmeters work when there is no current flow and you are solely interested in potential difference between the electrodes.

Since there is no transfer of electrons, how does this apparatus
actually work?

This is perhaps a misconception. Potential difference only develops when electrons are transferred (only once) but the is no continuous flow of electrons (which constitutes current). If you are combing your dry hair in winter, a huge potential difference develops between your hair and the comb. You comb is still &quot;charged&quot; when you move it away from your hair. The electrons were transferred but only at one instant. There is no current flow between your comb and the hairs.