Only a Rockruff with the "Own Tempo" ability can evolve into Dusk form Lycanroc when leveled up at level 25 from 5pm to 5:59pm (or 5am to 5:59am in Moon version).
Own Tempo isn't one of Rockruff's regular abilities, nor is it a Hidden Ability.
About a year ago there was an event for Own Tempo Rockruff, but that event has ended.
The only way to currently get an Own Tempo Rockruff is to trade for it, which shouldn't be too difficult because Own Tempo can be bred onto new Rockruff.
Source: 1|2