845 To reunite all his children, scattered and led astray by sin, the Father willed to call the whole of humanity together into his Son's Church.
Also, the next chapter explains that there is no salvation outside the Church, properly understood.
CCC 841 often is quoted out of context to imply that Catholics are indifferentist. This is why I have the larger context.