Extremely compact objects containing a region of trapped null geodesics could be of astrophysical relevance due to trapping of neutrinos with consequent impact on cooling processes or trapping of gravitational waves. These objects have previously been studied under the assumption of spherical symmetry. In the present paper, we consider a simple generalization by studying trapping of null geodesics in the framework of the Hartle-Thorne slow-rotation approximation taken to first order in the angular velocity, and considering a uniform-density object with uniform emissivity for the null geodesics. We calculate effective potentials and escape cones for the null geodesics and how they depend on the parameters of the spacetimes, and also calculate the local and global coefficients of efficiency for the trapping. We demonstrate that due to the rotation the trapping efficiency is different for co-rotating and retrograde null geodesics, and that trapping can occur even for $R>3GM/c^2$, contrary to what happens in the absence of rotation.