We report the observation of the rare charm decay $D^0 \rightarrow K^-\pi^+e^+e^-$,
a search for nine lepton-number-violating (LNV) and three lepton-flavor-violating (LFV) neutral charm decays of the types $D^0 \rightarrow h^-h'^-l^+l'^+$ and $D^0\rightarrow h^-h'^+l^+l'^-$, where $h$ and $h'$ represent a $K$ or $\pi$ meson, $l$ and $l'$ an electron or muon, and a search for seven lepton-number-violating decays of the type $D^0 \rightarrow X^0e^{\pm}\mu^{\mp}$, where $X^0$ is a $\pi^0,\ K_S^0,\ K^{*0}, \rho^0,\ \phi,\ \omega,\ {\rm or}\ \eta$ meson. The results are based on $468\ {\rm fb}^{-1}$ of $e^+e^-$ collision data collected %at or close to the $\Upsilon(4S)$ resonance
with the \babar\ detector at the SLAC National Accelerator Laboratory. In the invariant mass range $0.675 < m(e^+e^-) < 0.875\ {\rm GeV/c^2}$, we find $\mathcal{B}(D^0\rightarrow K^-\pi^+e^+e^-) = (4.0\pm 0.5\pm0.2\pm0.1)\times 10^{-6}$, where the errors are, respectively, statistical, systematic, and due to uncertainty of the branching fraction of the decay %$D^0\rightarrow K^-\pi^+\pi^+\pi^-$
used for normalization. In other invariant mass regions where long-distance effects are potentially small, we obtain a 90\%
confidence level (C.L.) upper limit on the branching fraction $\mathcal{B}(D^0\rightarrow K^-\pi^+e^+e^-) < 3.1 \times 10^{-6}$. We observe no evidence for any
LFV or LNV modes and establish 90\% C.L. upper limits on the branching fractions in the range $(1.0 - 30.6) \times 10^{-7}$. Individual limits are one to three orders
of magnitude more stringent than previous measurements.