Raman-heterodyne-detected multipulse rf nuclear-spin-echo decay of ${\mathrm{Pr}}^{3+}$ in ${\mathrm{YAlO}}_{3}$ is measured with continuous-detection light throughout the spin-locking pulse train and with the light on during a short period centered at the echo time only for every sixth echo. The echo decay shows three components: an initial fast decay (\ensuremath{\simeq}400 \ensuremath{\mu}s), an intermediate decay (5.4\ifmmode\pm\else\textpm\fi{}0.6 ms), and a slower decay of 22.5\ifmmode\pm\else\textpm\fi{}1.7 ms for gated echoes. For cw light, the decay is described by the same initial fast decay, but a single decay at 7.6\ifmmode\pm\else\textpm\fi{}0.6 ms is observed at longer times. The difference in the observed echo decay is attributed to optical pumping effects. A rate-equation model is constructed, consisting of three ground-state levels and three excited-state levels. It includes radiative decay, spin-lattice relaxation, the optical pumping and rf pulses, and rf coherence loss due to excited-state occupancy. The model shows three decay times, fast (\ensuremath{\simeq}400 \ensuremath{\mu}s), intermediate (6.08\ifmmode\pm\else\textpm\fi{}0.07 ms), and slow (21.0\ifmmode\pm\else\textpm\fi{}0.1 ms) decay for gated echoes. The last two rates are affected by the strength and duration of the optical field. For continuous light, the calculated echo is seen to decay at \ensuremath{\simeq}400 \ensuremath{\mu}s, 2.04\ifmmode\pm\else\textpm\fi{}0.07 ms, and 3.43\ifmmode\pm\else\textpm\fi{}0.02 ms and then increases at a much slower rate (100 ms). This is only an apparent increase, because significant signal cancellation occurs in the sum of the six ion groups contributing to the signal. If a reduced light level and faster spin-lattice relaxation rates are assumed, the calculated echo-decay times for cw light are 2.44\ifmmode\pm\else\textpm\fi{}0.03 and 7.37\ifmmode\pm\else\textpm\fi{}0.04 ms. This corresponds to a homogeneous linewidth increase of 2.5 times and a spin-lattice relaxation rate increase of 2.5 times equivalent to crystal heating by the cw detecting light of 0.35 K over that of the gated light.