In Inferno Canto XXVI, Virgil does not scold Dante for sitting to rest. Instead, Virgil rebukes Dante for speaking with Farinata degli Uberti, a condemned heretic in the sixth circle.
The confusion may stem from Dante's fatigue in earlier cantos, but in XXVI the specific correction concerns unauthorized dialogue with the damned—not physical rest.