You have to have room in your party. If you have at least one empty slot, and go to the house at the north of Route 18, and talk to the PKMN Ranger, he will give you the Larvesta Egg. Hope this Helps!
Directions to the house: Start at Nuvema Town. Go north, cross the first patch of grass, and turn left to the water. Use surf, then surf south, then west, and then south to the piece of land. Go up the stairs, then all the way south. Exit the Route to the left. Use Surf, and head west, avoiding the riptides. You should come to a girl swimming up and down. Go south, and use the southernmost riptide. Land, then go up both stairs. Go behind the hiker, past the tree, and go left. Enter the house. Talk to the ranger in red. Hope this helps!