I am a UK citizen travelling from UK to the Maldives, with a stopover of 7 hours in Dubai, then a stopover in Sri Lanka of 9 hrs, will I need any visas?
No, you don't need a visa if you have confirmed onward tickets and your stay is less than 24 hours.
Sri Lanka layover
Yes, in your specific case you need a visa. Typically you wouldn't if your layover is less than 8 hours (provided you have confirmed onward tickets of course)
Yes, you need a visa but you can get one on arrival for 30 days
Emirates airlines has an IATA-Timatic based web app to figure this stuff out