Italian Max Biaggi pipped Jeremy McWilliams by 0.002 seconds in qualifying for that race.
Dovizioso's team mate Jorge Lorenzo took third spot on the front row for Sunday's race at the Red Bull Ring.
Another Ducati rider, Danilo Petrucci, was fourth fastest ahead of Briton Cal Crutchlow and France's Johann Zarco.
Four-times champion Marquez has 181 points after 10 races to lead the championship and is in a good position to extend his 49-point advantage over second-placed Valentino Rossi.
The Italian great failed to make it through the first qualifying round and will start in 14th place.
(Reporting by Shrivathsa Sridhar in Bengaluru, editing by Ed Osmond)
Share
