You don't have to have anything previously recorded. You just have to open Sonar, click Metronome's "enable on playback" button and start transport. I may have missed your point there but you really don't have to do anything other than that. If you are worried about cluttering up your drives with blank projects don't because if you close the project without saving (and don't create any new folders when opening the project) then nothing gets saved to disk.
However something that I've started is a project specifically for practicing. I have multiple midi bass tracks and basic drum patterns in the same project set to loop. That way I can just open that project and jam along to blues, jazz or other patterns or mute all the tracks, enable the playback metronome and practice scales.
Sonar is a pretty hefty program just to have open for just a metronome though. As was mentioned there are apps and less heavy duty options if all you want is a click track t play scales over.