NYC (later PC and Conrail) used to have track through Ontario. That was abandoned years ago.
NS used to have trackage rights over CN, but none of their own track. These trackage rights were cancelled ~5 years ago when NS lost the Ford contract although they still operate cross-border transfers into Fort Erie and Windsor. (The Fort Erie job may have been recently terminated, with CN delivering cars to Buffalo instead.)
CSX still owns an isolated operation around Sarnia, ON, which used to be part of a larger system of C&O trackage in Ontario, but most of that has also been abandoned.
CSX also operates up into Montreal from New York state.
BNSF operates into Vancouver from Washington state.
BNSF also has an isolated operation in or near Winnipeg, Manitoba.
The Toronto, Hamilton and Buffalo railway, before being fully absorbed into Canadian Pacific in the mid 1980s, was jointly owned by CP and NYC. So was the old Canada Southern Railway, which later in life was that NYC/PC/CR Ontario route mentioned at the very beginning of this post.