The rail company owns the rails. Contact the rail company indicated on the rail and get written authorization to scrap or sell the metals. Bring two extra copies of the authorization to the yard you wish to sell to (one for their records and one for their filings) after you've confirmed they will buy them with proper documentation. None of this should cost you $, just a few emails or phone calls.
Bookmarks