Inviting a likely reviewer of a rejected manuscript as a co-author
Two points.


It's actually irrelevant, if X was the reviewer of the paper or not. If you want to ask them, do it. It does not matter, if X knows the paper already or not, but assume they don't.
I would appeal more to the professional interests of X in the mail. Like, "this paper focuses on the weight distribution of spherical cows in vacuum. My coauthors and I think the paper might benefit from your expertise on spherical horses in low gravity".