For rear derailers, all Shimano stuff since the advent of indexing is theoretically compatible (except pre-9-speed Dura-Ace which had its own unique cable-pull ratio).
However, newer rear derailers designed for more gears have tighter tolerances. A 6-speed-era RD will shift very slugglishly on a 10-speed cassette, but a 10-speed-era RD will shift very quickly on a 6-speed freewheel.
To answer the OP's specific question, 6-speed freewheel is still narrower than 10-speed cassette, so the 10-speed-era RD will have no trouble covering that range.
For front derailers, there is the added factor that higher-speed chains are narrower, and a 10-speed-era FD may rub very easily on a wider 6-speed-era chain.