Thats doable. Sonar has an external insert plugin. If you have more than just the one stereo output that is outputs 3 and 4 you can use those as a stereo out to you compressor and bring is back in with inputs 3 and 4.
From page 1291 in the Sonar manual.
External Insert plug-in (Platinum and Professional only)The purpose of the External Insert plug-in is to route audio to and from existing I/O ports in SONAR, allowing an
external audio device to be effectively patched into any FX Rack. This allows you to seamlessly incorporate your
favorite outboard gear in a SONAR project.
The External Insert plug-in is able to measure and automatically compensate for the round-trip delay through your
audio hardware (the time it takes for the audio to exit you computer, be processed by your external audio
hardware and finally returned to the computer).
External Insert interface
The left-hand side contains the hardware/external Send controls and the right-hand side contains the hardware/
external Return controls.
Send Stereo Mode buttons:
L (Left). This toggle enables/disables the left channel send output (enabled by default).
R (Right). This toggle enables/disables the right channel send output (enabled by default).
Mono. This toggle sums the stereo signal to make it dual-mono so the send output has the same audio on the
left and right channels.
Send Level. This is a +/- 24 dB trim to the level that is passed to the external send. This parameter is
automatable.
Send VU Meter. This meter shows the signal level being delivered to the external send. Since this is feeding a
sound card output, it is important to avoid clipping at this stage.
Send Port Picker. This control lets you choose an audio output that currently has nothing routed to it. This is the
port that you should connect to the input(s) of your external gear. All output ports that are already used in the
project are excluded (except for master buses that have other instances of the External Insert plug-in routed to
them).
Return Phase Control. This control flips the phase of the signal being returned to the external return input. This
parameter is automatable.
Return Level. This is a +/- 24 dB trim to the level that is passed from the external send. This parameter is
automatable.
Return VU Meter. This meter shows the signal level entering the external return.
Welcome to the forum.