You'll need to use an aggregate audio driver to combine multiple different audio sources and/or hardware devices in that way, recording YouTube or Soundcloud audio while at the same time recording from a live microphone, etc, etc.
Mac OS has a built in facility for aggregating audio devices. On Windows the most common path is to use ASIO4ALL for that.