In theory that would have been possible from the very start. After all, music doesn't need much bandwidth (*1), especially when using synthesized form like with a sound chip such as the SID.
In reality the software structure of (most) machines in the 70s and 80s would not support this. They were single program, single tasking machines and the OS was not running in parallel in the background, but rather a toolbox.
Any solution to have two tasks running in parallel would have required specific software to do so, programmed in a way not to disturb each other. Quite rare at the time, when every program was made as if it owns the machine.
Bottom line: While the hardware was capable, common software wasn't.
Now, having said that, one of the very first dedicated home computers, the TI 99/4, could have pulled it off. Despite the bad rep the system had, it was one of the finest available - clearly showing an effort, by engineers coming from a mini computer world, to create an integrated environment. Its system software had a function that could play sound/music sequences in the background without interfering with foreground applications. It could also loop it.
In addition, as Peter Parker reminds us, the TI had the unique feature of being able to mix an external audio signal with its output (*2). So a setup using an external source, like a tape, was possible.
So the answer may be rather 'yes, but', as this would, while being transparent, still had required a bit of cooperation of the foreground application to enable and setup the music to be played.
*1 - Bandwidth needed for high quality uncompressed is ca. 50 KiB/s (*3), for syntesizersynthesizer (sound chip) based music less than 1 KiB/s. Bandwidth of typical 1970s Microprocessor systems 300-1,000 KiB (C64 a bit less than 1,000 KiB/s). Early PC (8088) ca. 1,200 KiB/s. AT class (mid 80s) started already above 3,000 KiB/s.
*2 - In fact, it did not only allow addition of sound, but was prepared for video as well. As said, it was a quite nice design, way ahead of its time.
*3 - It has been criticized that this is way less than the 172 KiB/s a CD uses. True. But that's one definition (also one that resulted from video recording features). Audio sources of the time would be FM-Radio at 15 kHz or compact cassette at 12 kHz (even the best Nakamichi decks with 1.2µ heads couldn't make it past 20 kHz - damn physics :)). So a sampling rate of 24 up to 40 kHz would cover everything at the time, with 24 kHz already passing as HiFi.
This is about (home) computers from the 1970s onwards, so assuming a 16 bit D/A converter seams a bit frivolous. Similarly for stereo. Equally important, the audio signal was usually transmitted as part of video to be played by the TV set. Analogue TV limits Audio to 25 kHz in most places of the world - and was, at the time, usually mono.
Bottom line, 50 KiB/s is a good assumption, rather at the upper end.