It's not a one-click function in SONAR. Basically it would be Spacebar to stop the transport, Ctrl+Z to undo recording, and W to rewind (if Rewind on Stop is not enabled). I don't know a lot about Mackie Control, but I'd be surprised if it ran a series of commands like that, especially given that they might need to be different, depending on where you started recording from, whether you have looping or punch enabled, and what option you have set for transport behavior on stop.
I have Spacebar, Ctrl+Z, W programmed into my left hand.