We introduce and validate a delensing framework for the Simons Observatory (SO), which will be used to improve constraints on inflationary gravitational waves (IGWs) by reducing the lensing noise in measurements of the $B$-modes in CMB polarization. SO will initially observe CMB by using three small aperture telescopes and one large-aperture telescope. While polarization maps from small-aperture telescopes will be used to constrain IGWs, the internal CMB lensing maps used to delens will be reconstructed from data from the large-aperture telescope. Since lensing maps obtained from the SO data will be noise-dominated on sub-degree scales, the SO lensing framework constructs a template for lensing-induced $B$-modes by combining internal CMB lensing maps with maps of the cosmic infrared background from Planck as well as galaxy density maps from the LSST survey. We construct a likelihood for constraining the tensor-to-scalar ratio $r$ that contains auto- and cross-spectra between observed $B$-modes and the lensing $B$-mode template. We test our delensing analysis pipeline on map-based simulations containing survey non-idealities, but that, for this initial exploration, does not include contamination from Galactic and extragalactic foregrounds. We find that the SO survey masking and inhomogeneous and atmospheric noise have very little impact on the delensing performance, and the $r$ constraint becomes $\sigma(r)\approx 0.0015$ which is close to that obtained from the idealized forecasts in the absence of the Galactic foreground and is nearly a factor of two tighter than without delensing. We also find that uncertainties in the external large-scale structure tracers used in our multi-tracer delensing pipeline lead to bias much smaller than the $1\,\sigma$ statistical uncertainties.