Track is the assembly of rail, ties, spikes, plates, etc. (Sorry, I work in the RR industry, and can't stand hearing rail referred to as track)
Anyways, you can get it for free sometimes if you ask the right maintenance guy. If you're looking to build an anvil, then you might specifically ask for a 1 ft section that he might have laying around. Most guys will give you a cold shoulder, but others will be happy to oblige.
If you are picky about what kind you want, the best rail to get would be anything over 132 lbs/yd. Ideally, you'd want something 141 lbs/yd and head hardened (for use in curves).
For a 3 ft section from your buddy, depending on what rail weight it is, 50 bucks might not be a bad deal.