Steam fans will have the rare chance to ride in the cab of a working heritage locomotive.