Steam train fanatics are being given the chance to ride behind an iconic First World War engine before its withdrawn for an overhaul.