Theoretically it should be possible. If you can set SONAR to record all sounds from soundcard, i.e. if your soundcard has "stereo mix", or maybe some MIDI Ox setting would work ... Or simply route the sound physically out and back in. There are more knowledgeable people around here to tell you.
What would be the use of such setting remains unclear to me. How can one possibly play anything sensible in tempo using a mouse? Piano roll is so much more accurate and better.