We revisit the problem of the reduction of the three-dimensional (3D) dynamics of Bose-Einstein condensates, under the action of strong confinement in one direction (z), to a 2D mean-field equation. We address this problem for the confining potential with a singular term, viz., V z (z) = 2z 2 + ζ 2 /z 2 , with constant ζ. A quantum phase transition is induced by the latter term, between the ground state (GS) of the harmonic oscillator and the 3D condensate split in two parallel non-interacting layers, which is a manifestation of the "superselection" effect. A realization of the respective physical setting is proposed, making use of resonant coupling to an optical field, with the resonance detuning modulated along z. The reduction of the full 3D Gross-Pitaevskii equation (GPE) to the 2D nonpolynomial Schrödinger equation (NPSE) is based on the factorized ansatz, with the z-dependent multiplier represented by an exact GS solution of the Schrödinger equation with potential V(z). For both repulsive and attractive signs of the nonlinearity, the NPSE produces GS and vortex states, that are virtually indistinguishable from the respective numerical solutions provided by full 3D GPE. In the case of the self-attraction, the threshold for the onset of the collapse, predicted by the 2D NPSE, is also virtually identical to its counterpart obtained from the 3D equation. In the same case, stability and instability of vortices with topological charge S = 1, 2, and 3 are considered in detail. Thus, the procedure of the spatial-dimension reduction, 3D → 2D, produces very accurate results, and it may be used in other settings.