Don’t Be That Guy
Suffice to say, Ms. Johansson won a French court case because a judge agreed that a French novel (not yet translated into English) contains a character who is often mistaken for her, and that the fictional character’s fictional affairs because it “fraudulently exploited her name, her image, and her celebrity.”
In short, I highly doubt this is going to make any difference to us here in the States (IANAL, and don’t play one on any media). I’m told it’s much harder to prove defamation in our courts (see all the suits brought against the various and sundry Puppy Kickers and their enormous payouts).
That said, outright using celebrities as characters in your stories is pretty much verboten. I wouldn’t do it, unless you’re bestest buds with a particular famous body and likely to stay that way. Now, personally, I would also recommend against using the explicit likeness of a celeb in your fiction, as well.
Except for inspiration. Look, here’s the thing, the problem with the French novel is the character is explicitly a celebrity look-alike, and one who has gotten attention for it. The trick here is, for us, don’t give your characters that context.
If you must have a character who you want to look just like Dwayne Johnson, or Sophia Loren, or the Duke, just describe them once, peg a physical characteristic you can touch on throughout the story, and let it go at that.
In science fiction and fantasy, you don’t have real celebs to worry about. Problem more or less solved. Sure, your urchin can bear a striking resemblance to the Court Sorcerer, or the Crown Princess, or the Space Despot’s missing younger brother, but who cares? All is fair in fiction. I anticipate you have a plan, and this is a case of clever foreshadowing. It *is* foreshadowing, isn’t it? Don’t make promises to your readers you aren’t going to keep, now (unless it’s actually a bait-and-switch, which could be borderline brilliant. Don’t worry: you don’t have to tell me which it is ahead of time. I do want to know, but I’m more than willing to wait until you publish).
Now, if you’re writing contemporary fiction of any stripe set in our world, and you have a celebrity as a character (or the aforementioned doppelganger) you’re going to have to deal with this. One simple option is to not make the portrayal in any way defamatory. The simplest way is to keep it a cameo. Let your Beautiful Person waltz into the scene, drop a comment or just a look, and waltz out: keep them part of the scenery.
Another way to do it is to prevent an explicit likeness. Give a physical description of your character, and have another character ask, “hey, are you…” Then have your look-alike respond with, “thank you! I’m not, but I get that all the time.”
Now, I suppose you could consult an attorney, but here’s applicable Fair Use information. Reading over that, I genuinely recommend against it. Just don’t open yourself up to that special hell.