Did steam engines ever venture off the owner railroads tracks? Today you see foreign diesel power on all of the class 1 railroads, would this have ever occured during the steam era?
Technically it happened all the time for short distances: any "Union Station" had locomotives of several railroads pulling trains into it!
Inter-line use of locomotives in the steam era wasn't as widespread as now for a number of reasons. Very few steam runs were more than a few hundred miles long -- steam locomotives needing servicing more frequently than diesels -- and running the same locomotive for very long, inter-line, runs wasn't practical. Second factor: modern diesels of different railroads are very similar to one another (beneath the paint job), so there is no technical barrier to using one railroad's locomotive on another railroad's track, but steam locomotives were not nearly as standardized.