This is not the original reference, but the most general (i.e., applicable to the non-compact and pseudo-Riemannian cases) result I know is:
Kühnel, W., & Rademacher, H. Conformal diffeomorphisms preserving the Ricci tensor. Proceedings of the American Mathematical Society, 123 Kühnel, W., & Rademacher, H. Conformal diffeomorphisms preserving the Ricci tensor. Proceedings of the American Mathematical Society, 123 (1995), no. 9, 2841–2848.
(1995), no. 9, 2841–2848The article is publicly available for free.)
Theorem 1* in there gives uniqueness in any case other than simply-connected, constant curvature spaces, and certain warped products with Ricci-flat spaces.
Check out the references in that paper, too.