A Pokémon's Ability, Nature, Gender, Shininess, IV's, Characteristic etc. is determined when the Egg is given to the player by the Day Care Man.
So the answer to your question is no. As if you get an Egg off the Day Care Man, save the game, hatch it, find out it's not the Gender you want etc., then turn the game off and hatch it again it will have the exact same details as the Egg you just hatched.
The only way to do what you're talking about is if you save before the Day Care Man gives you the Egg. After it hatches if it's not the preferences you want you can turn the game off and start the process of getting the egg, hatching the egg, finding out it's details and then either keeping it or turning your game off and beginning the process again.
The gender ratio for Riolu is 87.5% Male to 12.5% Female.
Source: Experience and Here.
Hope I helped :)