I think it might be Hashirama. This is completely being made up but what if somehow Hashirama was able to get to Sasuke either himself or a white zetsu (implying he controlled it somehow) and then gave his cells to sasuke. Maybe orochimaru will help too. This way sasuke is able to unlock the rinnegan.