It's not a rule that you cannot place these close together. Instead, it's really a suggestion since PCs, broadband modems, and printers (among other devices) can interfere with the scanner's operation. Many electronic devices do produce (usually) weak spurious signals at a number of frequencies. If one or more of these is on a frequency, or nearby, one of the programmed items on the scanner, it may interfere with what you can hear, or perhaps cause the scanner to stop and hold on a channel where there is actually no activity at that time.
Unless your PC or modem is extremely noisy, there likely would be no issue with an external antenna that far away from PC/modem. Signals from the exterior antenna would almost certainly be strong enough to override weak interference from something that far away, and using high quality coax also would isolate any interference received though proximity to the cable.
That being said, if your scanner itself is very close to a device producing interference, you might still get some effects from signals getting to the scanner itself, through the case. This would be more pronounced with a portable scanner connected to the antenna, as most have a plastic outer case. Desk/mobile scanners usually have a metal outer case, which helps isolate the scanner from unwanted signals.