A compactness theorem for a fully nonlinear Yamabe problem under a lower Ricci curvature bound