The pair were also nominated for this year's award in a 30-strong shortlist that also featured the likes of France's World Cup winners Mbappe and Antoine Griezmann and Modric's Croatian teammates Ivan Rakitic and Mario Mandzukic.
After a shortlist of 3o players was selected by France Football magazine, a jury of worldwide journalists voted on the players they considered first, second and third.
The annual football award, presented by France Football, has been dominated by Messi and Ronaldo for the past decade, with each clinching the accolade five times apiece since 2008.
Paris Saint-Germain's teenage forward Kylian Mbappe - who won the Kopa Trophy for the best young player - came fourth, leaving Messi to settle for fifth position.
As he picked up the 63rd edition of the Ballon d'Or it represented a clean sweep of the highest accolades in global football, with the FIFA World Cup Golden Ball, FIFA Best Men's Player and the UEFA Men's Player of the Year.
Pressed on choosing between the Ballon d'Or and World Cup, Griezmann said: "The World Cup!"
France Football has awarded the prestigious prize to the best male player every year since 1956, adding a women's award this year. Modric had never previously been in the top three.
There was controversy when Hegerberg was asked by co-host Martin Solveig if she knew how to "twerk", to which she replied "No", and he later apologised for any offence caused.
Croatia lost 4-2 to France in Moscow in the final in July. I don't think the respect has been there. Taking a stand against what she describes as a lack of respect for female players in Norway, she has not played for the national team since 2017 when it crashed out of the group stage of the Women's European Championship without scoring a goal.