This scenario occurred in a 2014 match in the french Ligue 1. Paul-Georges Ntep scored a goal for Rennes against Reims with a header after dribbling up to the empty goal. On this occasion at least, the referee let the goal stand.
Herman Koré repeated the feat in the French cup , according to google translate:
During the 8th round of the Coupe de France between Chateaubriant and
US Concarneau Saturday Herman Kore had fun pushing the ball head on
the opponents goal
and again the goal stood, even though the opposition were upset.
So in practice it seems likely that the goal will stand, but the referee could possibly decide that the act of heading the ball in from the ground was "unsporting behaviour". This is indeed recommended in this post, which claims to have been "approved by the U.S. Soccer Federation’s National Referee Program". In this case the referee would stop the game, issue a yellow card to the attacker, and restart with an indirect free kick to the defending team.