The tool RivEX can help with this problem as long as your river network is vector and not a raster network.
If you define the main river as starting at the mouth of the network then RivEX has the Add Main Channel.
If you are starting at some random point within a catchment is the main channel the route to source? If so you could use the Find source of site tool.
If your definition of main river from some random starting point is the route to source and route to network mouth then you could use the Create site centred reach and set the distances to a very large value to ensure searching reaches the source and mouth, an example is shown below.