Yes, this is done all the time. On CSX's routes in my area, former Maine Central and Boston and Maine lines, there are interchange points with other railroads. On the former B&M, CSX runs its freights to a couple of sidings in Ayer MA where they interchange with the Berkshire and Eastern and NS. They'll leave the cars on the sidings and return or continue on with whatever freight is left for them.
This is a rather interesting situation, probably different than normal due to the arrangement set up by NS and Pan Am Railways as part of their Pan Am Southern. The B&E is a Genesse and Wyoming subsidiary operating on behalf of CSX's PAR ownership. It's not unusual seeing NS freights coming in from the west in addition to the B&E.
The same scenario plays out in Maine at Danville, Jct. This is where the St. Lawrence and Atlantic (former Grand Trunk) crosses over CSX (MEC). There's a long siding where freight is left for either railroad to swap traffic destined to either Montreal or to Portland. The SLA used to run all the way to Portland but they have closed their line and use the interchange with CSX instead.
In some ways, this is no different than leaving freight on a siding or in a small yard for a local to pick up later for delivery down a branch to various industries.