I don't see anyone beating Ryoto Machida in the UFC. You'd need to be as fast as him, but there's no one that is. You would have to be an equal or better striker, and there's no one that is either.
Rampage could, probably, but I think Lyoto would just outpoint him. If Rampage manages to get Lyoto down, then Machida will just get right back up. He's just way too tricky, and with him, you're going to always stay alert.