(a) The accumulated contributions with interest of a member who is neither eligible for a service nor disability pension, nor has a vested right to a service pension, shall be refunded upon withdrawal from service.
(b) If a member has a vested right to a service pension and withdraws from service and is not immediately eligible for a service or disability benefit, the member may request a refund of accumulated contributions with interest. Refund of such contributions shall extinguish all rights to benefits under this chapter.