You will need to wait untill Gen 7 gets it's Move Tutors for it to be legal.
Since in gen 6 you can only pass down the ball if the mother is in it, the mother would need to be catch in HGSS. Because of this, she could not have a HA. Breeding her with a male with HA would not generate any pokémon with HA, since the father only passes it with Ditto.
Since in gen IV-VI Starmie can learn gravity with move tutors, right now you can only chose HA or Lure Ball.
If we get new gen 7 games with move tutors, you could catch a Starmie with it's HA with a Lure Ball in Sun and Moon and teach it gravity in the new game tutors if they have the move.
Edit: Sorry for the mess/redundancy. I'm very sleepy right now. Can try to revise it tomorrow morning