Yes, this can be done with a combination of two null-sinks and three loopback devices.
It's a bit easier to understand with a diagram:

The green blocks are the null sinks. The red lines are loopback devices.
Tip: Before continuing, turn your volume down on your headphones. Creating these objects can temporarily create a feedback loop. Don't worry, that will go away when we connect everything up as shown in the diagram.
Execute the following from a terminal to create the null-sinks and loopbacks:
pactl load-module module-null-sink sink_name=Virtual1 sink_properties="device.description='Chrome\ Splitter'"
pactl load-module module-null-sink sink_name=Virtual2 sink_properties="device.description='Chrome\ and\ Mic\ Combiner'"
pactl load-module module-loopback
pactl load-module module-loopback
pactl load-module module-loopback
Note that the sink name and description can be anything you want. The Description will appear in pavucontrol
and make things a bit easier to configure.
You now need to wire everything up:
- Launch Chrome and play your YouTube karaoke song. This will create an entry in the Playback tab of pavucontrol.
- Launch Audacity and start a recording. This will create an entry in the Recording tab of pavucontrol.
- Launch
pavucontrol
On the Recording Tab configure the loopbacks as follows:

On the Playback Tab configure the loopbacks as follows:

My headphones are called Mpow H10, so choose whatever speaker or headphone output you want instead. Built in Analog Stereo is the microphone input. Again, choose whatever your mic is called in that selection.
That's it! You will now have the audio from your microphone and YouTube video mixed and captured in Audacity and hear only the Youtube audio in your headset.
If you want to know more how this works, here are some useful references: