Strong electromagnetic Rabi splitting is usually observed in high-finesse semiconductor microcavities. The optical properties of a $\frac{3}{2}\ensuremath{\lambda}$ cavity with an embedded unidimensional rectangular grating are studied in a semiclassical framework for S and P polarizations when the reciprocal-lattice vector of the grating is close to the characteristic light wave vector, taking into account the nonlocal exciton contribution to the polarization. In this case, two propagating electromagnetic modes with different parallel wave vectors sample different states in the exciton dispersion curve of the quantum well, and therefore they can affect both the photon density state and the exciton oscillator strength value of the system. The possibility of enhancing the Rabi splitting value with respect to the usual planar microcavity is pointed out by selected numerical examples.