Spare a thought for Robin Wright, the ageing Hollywood actor who appears in a new film called The Congress. Once, long ago, she played the plucky Buttercup in The Princess Bride and beautiful, tragic Jenny in the Oscar-winning Forrest Gump. Now her career's on the skids – she's the wrong side of 40. The studio loved her in her youth, but these days she's embarrassing. Any relation to the real-life Robin Wright is presumably coincidental.

"This movie is not autobiographical in any way," Wright explains by way of introduction, taking her seat in a conference room at the Cannes film festival. "Other than the fact that it uses my name and the roles that I did. And other than the fact that I will always be known as Buttercup and Jenny. Even today, after 30 years in the business, people still come up and say that they loved me as Buttercup and Jenny." The more she protests, the less convincing she sounds.

It says a lot about The Congress that it risks sowing such confusion, blurring the line between the actor and the character, inviting us to draw parallels between the confident, successful Wright and her gloomy, outmoded alter ego. Ostensibly, the film is science fiction – directed by the Israeli animator Ari Folman and spotlighting issues of intellectual property, internet avatars and the withering flesh. But, like the best SF, The Congress is actually about the here and now. We might not want to live in the world that it shows us. On some level, however, we already do.

In the interest of accuracy, it should be noted that the real-life Wright appears to be doing just fine. In recent years she has acted in the likes of Moneyball and The Girl With the Dragon Tattoo and picked up a Golden Globe for her brilliant, steely turn as a Beltway Lady Macbeth in the Netflix series House of Cards. At the age of 48, then, she has already beaten the odds, fashioning a comfortable, rewarding career from the bonfire of Hollywood middle-age. Most of her contemporaries have not been so fortunate.

Robin Wright, the cartoon character, in The Congress. Photograph: Allstar

"I feel very blessed," says Wright. "I'm in my 40s. I don't inject my face with Botox. And I've done more work in the past five years than I've probably done in my whole career. You couldn't pay me enough money to go back to being 20. So many tears, what a nightmare it was. It's much better being older." She rolls her eyes. "But I know what it's like for other people; I know how the business works. This movie is basically the macabre reality of what's going on now."

At the start of The Congress, Wright's character is given an ultimatum. If she agrees to sell the rights to her digital image, the studio can scan her and sample her and put her straight back to work. That way the young Robin Wright is free to live on as a movie star, while ageing, sagging Robin Wright can shuffle off into moneyed obscurity. The concept, the actor points out, is not especially far-fetched.

"Ari asked his location scouts to build a scanning device for the film. He wanted it to be like a CT scan, like an x-ray machine. But the scouts said: 'Oh no, there are four of those in Los Angeles already, we can use one of those.' " To further muddy the waters, it transpires that Wright had already been inside one for her role in Robert Zemeckis's motion-capture Beowulf movie. "So I don't know why Ari didn't ask me," she laughs. "He could have gone and got my chip. I wouldn't have had to be in the movie at all."

Instead, The Congress proceeds to usher her straight through the uncanny valley: mo-cap to the left of us; CGI to the right. Alighting in the cartoon zone of Abrahama, Wright discovers that her studio avatar (by my count, the third incarnation of Robin Wright) has become the era's highest grossing digital star, taking her place alongside an animated Clint Eastwood and a grinning, toothy Tom Cruise. Along the way, the director juggles live action with loopy psychedelic animation that calls to mind the Beatles' Yellow Submarine period. I'm guessing the real-life Tom Cruise does not play the role of Tom Cruise. And yet by this point, the film has led us so far into the rough that pretty much anything is possible.

Folman explains that, in conceiving the story, he initially experimented with the Adobe Flash cutouts he used on his previous film, the shattering 2008 documentary Waltz With Bashir. He soon decided against them. Folman wanted The Congress to have a hand-tooled, old-fashioned quality. The best way of critiquing the state of modern Hollywood, he argues, is to make a film that takes us right back to basics.

Robin Wright with Ari Folman. Photograph: Joerg Carstensen/EPA

"Modern technology has changed the whole process of making a picture," Folman says. "The role of the director has changed because there is no sense of urgency on set any more. Everything can be fixed and invented in post-production. These days you wouldn't have Francis Ford Coppola in the Philippines for 400 days shooting Apocalypse Now. He'd do the whole thing in the studio and it wouldn't be the best war movie ever made."

He gives another example. "Blade Runner is my favourite sci-fi film of all time. It's craftsmanship at its best. Everything was built from scratch with wood and aluminium; the whole of Los Angeles, built by hand. That film is 30 years old but it will live for ever." He pulls a face. "But then look what happened. A few years ago, the same guy, the same director, Ridley Scott, made Prometheus. This time he had everything in terms of technology and look what happened, the film is forgotten already. Or did you see Life of Pi? I couldn't watch it, I saw the craft. It was a joke for me. It's a CGI movie." Hollywood's perfect digital paradise, he insists, might not outlive us after all.

In the meantime, where does this leave the industry itself? Folman feels the business will split into two entirely distinct camps, with CGI product in the multiplexes and live-action drama relegated to special screenings in museums. If that happens, Wright knows which side she would rather be on. She was never keen on being a studio puppet anyway.

"For actors in Hollywood, it's very straightforward," she explains. "We're well-paid animals in a zoo. And if you agree to play the dog-and-pony show, and smile on the red carpet, and show up at every fucking envelope that's opened, then you can become a celebrity and become a commodity. But if you choose not to do that, you are seen as not bankable."

Or to put it another way, Wright had her moment and chose to let it whistle by. Films such as The Princess Bride, State of Grace and Forrest Gump had made her a star, while her tumultuous, on-off marriage to Sean Penn spun her into a household name. The pressure was on her to play the game and book a place on the A-list. In a different world, a parallel universe, she might have been Meg Ryan, or Michelle Pfeiffer, or Sharon Stone: her 1990s contemporaries who seized the chance when they could.

"Oh yeah, they wanted to make me America's sweetheart," she recalls. "They wanted to make me the next big ingenue, the studio bosses behind the curtain. But what happened was that I turned down a lot of movies that simply didn't blow my dress up. Plus I was too busy being a mom at the time."

When a male actor turns down studio pictures, it might be seen as evidence of intelligence and good taste. When a woman does it, it is regarded as being wilful and awkward.

Wright, it seemed, simply did not know what was good for her. "I remember there was a turning point," she says. "I think it came right after Forrest Gump, when I turned down the cover of Vanity Fair. That was blasphemy. You just don't do that. And I remember, after that, not getting a couple of movies that I really wanted to do. And I was told, 'Well, you know, if you had done Vanity Fair it might have been different.' It was like I'd made this big mistake."

At least she can look back on this time from a position of strength. Wright has weathered the vicissitudes of celebrity, raised two children and returned to the fray without missing a beat. Today, knocking 50, she is secure enough to stand as an emblem for all the other American actors who have found themselves shoved to the sidelines; the women who are viewed as too demanding, too 20th-century, too inconveniently long in the tooth to be put in front of a movie camera. The issue, she feels, is endemic. Youth-obsessed Hollywood shoulders a large part of the blame. But the general public must bear some responsibility too.

"I'm worried that the audience is being conditioned," she says. "That's my real fear. Because if they don't want to see wrinkles on the screen, if they actually fear looking at them, then it's only going to get worse. Those of us who don't want to shoot up and cut and sew, we're just not going be cast." She shrugs. "I don't know, it's not good. Maybe we're already past that point. I just pray I can keep working. I just pray I grow old gracefully." These ambitions, one hopes, need not be mutually exclusive.