In reply, Pakistan easily reached the target in 39 overs thanks to unbeaten 69 by Babar Azam and Shoaib Malik who shared an unbroken 119 run partnership for the fourth wicket.
Malik hit three sixes and two boundaries in his 81-ball knock while Azam, who had scored successive hundreds in the first two matches, scored his runs from 101 balls.
This was Pakistan's eighth consecutive ODI win which also included their Champions Trophy triumph in England in June while Sri Lanka succumbed to their 11th consecutive ODI defeat.
Ali’s performance catapulted him to the top of world ODI rankings.
“It was my childhood dream to be world number one and it was my goal when I started cricket so I am very happy that this has come true. It’s always my aim to take wickets and anchor the team’s win so I am again happy to be the main bowler,” he said.
Sri Lanka trail the series 0-4 and will be hoping to avoid a whitewash in the fifth and final match which will be played in Sharjah on Monday.