Ability to export more will lead to greater production.
The pipeline will both increase the price Canada gets for its oil by reducing the share the railways get from the price, and (very slightly) decrease the world price because of increased supply.
Splitting the earnings differently between Canada and Canadian railway companies is a zero–sum game. It just changes which company makes what percentage of the profit. The real win for Canada will be additional production. The Prime Minister of Canada stated that the new pipeline would allow them to “export an additional 1 million barrels a day to growing markets in Asia.” That’s a net benefit for everyone. It’s additional profits for Canadian society and increased supply on the world market.