I thought it was a little tank engine...
From Wikipedia ....
Filming[edit]
Location scenes filming in India took place at the Amber Fort, in Rajasthan.
Some of the rail sequences were shot in southern Spain in the province of Granada. The area's dry arid steppes was used to portray British India. Parts of the railway, which are now abandoned, traversed the northern part of the Sierra Nevada between Guadix and Baza.[4] The ending was filmed at Barrio Primero De Mayo station at 37°23′45.27″N 3°31′39.75″W.
An article entitled Railway Films of the Raj by Ray Ellis was published with the Indian Railway Study Group Newsletter No.9 in January 1993. It stated:
A large part of this film was shot on location in Spain, on the 5'6" gauge Zafra-Huelva Railway, of the RENFE. Originally built by a British Company, the line runs parallel with the Spanish-Portuguese border, and has some spectacular bridges and some very Indian looking scenery. The little tank engine used "Empress of India" is one of four 0-6-0T's built by Kerr Stuart (works nos 713,714,715 & 725) in 1900 for the South of Spain Railway, and later RENFE 030.0209-212. The engine used being modified to look more like a locomotive filmed in India, which included the fitting of 'chopper' couplings.
For filming sequences on the sound stage at Pinewood Studios, London, full size replicas of the locomotive, rolling stock and part of the bridge were constructed, with Pinewoods usual remarkable accuracy.
Some scenes were also filmed in India using metre gauge trains, somewhere near Jaipur. These include the departure of the 'refugee' train and the scenes where the 'escape' train catches up and passes the 'refugee' train. The 'refugee' train is hauled by an OJ class 4-4-0 (built by Bagnall in 1943) and the 'escape' train is hauled by a TJ class 0-6-0T (built by Bagnell in 1942, and sent to India, despite having been ordered by a steelworks in Turkey!). This later engine was also heavily modified to look more like the modified locomotive used in Spain.
So should be easy to mod something up - that's what the film makers did!!