Evolution in this game works differently than the main series games. Evolution isnt a privilege you earn until AFTER you finished the epilogue. Yes, in order to evolve any Pokemon you have to first finish the main story, then finish the epilogue that comes after. Once the epilogue is over, you can take the lapras to the Tree of Life and talk to Xearnes. It will then guide you into evolution. Pokemon that evolve by level will have to reach that level in order to evolve, for example Mudkip must be at least level 16 to evolve into Marstomp. Pokemon that evolve by other means (Trade, Happiness, or Item) can just evolve whenever you desire. Pokemon like Eevee that have multiple forms of evolution you simply choose which you want it to evolve into.
So to answer your specific question, you can evolve your Riolu after completely the epilogue.
Source: I have the game myself