At this point, barring some as-yet-unknown backstory (e.g. in “Fire and Blood” this fall), there is no precedent for an annulment in the Targaryen family. Even in cases where the spouses have functionally separated (like Maegor I and Ceryse Hightower, or Viserys II and Larra Rogare), they still remain married. There is plenty of precedent for polygamy, though, and GRRM has refused to rule it out in later times when asked — meaning, he has left the door open for Rhaegar to do it with Elia and Lyanna if that’s what he wants.
The show, however, has completely sidestepped the polygamy angle. (Thinking about it, I’m not even sure the show specified that Aegon married both Rhaenys and Visenya, just that his sisters helped him conquer Westeros.) Rather than backtrack to explain polygamy right before it comes up — which would feel clunky and almost like a retcon at this point — the show went the annulment route, figuring that viewers would know what that was.
Polygamy in the books would also sidestep the potentially thorny problem of the legitimacy of Rhaegar’s older kids — did he render them illegitimate when he annulled his marriage to Elia? There’s room to disagree (I’d say he didn’t, plenty of people would say he did), but because Rhaegar’s kids are both dead in the show’s continuity, it’s a moot point. But with fake Aegon running around in the books, his position becomes much less tenable — for a very cheap reason — if someone pulls out a moldy scroll saying Rhaegar and Elia’s marriage was annulled.
So I think in the books’ continuity, Rhaegar was married concurrently to both Elia and Lyanna, paying off the polygamy precedent in the backstory — and honestly, if it has no bearing on later events, what is the point of including it as a practice? — and rendering both Jon and his half-siblings legitimate. The show, not wanting to explain the polygamy angle and having definitively nixed fake Aegon, went with a simpler explanation.