Yes, they are cousins.
Both belong to the extended Samoan wrestling family that has produced generations of performers, which is why surnames and family ties come up so often in WWE history. Umaga, whose real name was Eddie Fatu, was part of that lineage, as were his brother Rikishi and the members of the Anoa'i family the Rock descends from. The connection is real family rather than a storyline invention, though WWE has never leaned on it heavily in either man's era.