You can no longer get Ralts's egg back. Your friend must have a Bad Egg. You cannot trade it, nor release it, nor hatch it. Either put it into Quarantine (I would do so) or Buy a new game, as if you restart the game, I think,but I am not sure, that the egg stays,