Portrayed/appeared in same film

M.E. Clifton James appeared as himself and Montgomery in I Was Monty’s Double.

Johnny Depp’s Hunter S. Thompson bumps into “himself” in a flashback scene in “Fear and Loathing in Las Vegas”

If the OP is willing to include television, on The Wire Baltimore police officer Jay Landsman is portrayed by Delaney Williams, and appears as Lt. Mello.

There are a few more of these.

Peter Benchley played a reporter in Jaws. Compton Mackenzie took the part of Captain Buncher in Whisky Galore! Erich Maria Remarque was a schoolteacher in A Time to Love and a Time to Die.

In addition to Landsman, The Wire has a lot of events based directly on things that really happened, and has a lot of cameos around them. For instance, former Baltimore mayor Kurt Schmoke, famously called “the most dangerous man in America” (by Charlie Rangel, I think) for his ideas about drug policy has a cameo as an advisor to the somewhat Schmoke-like mayor in which he warns the mayor that if news of a drug-decriminalized zone gets out, people will call him the most dangerous man in America.

Republican then-governor Robert Ehrlich had a cameo as a security guard in the office of the unnamed Republican governor, although the fictional governor never appeared.

And the best one – Donnie Andrews, one of the stick-up boys who inspired the Omar character, plays Donnie, an older guy who is part of Omar’s crew in later seasons, including the “Spider-Man” shit where Omar jumps out a sixth-floor window and merely breaks his leg. That actually happened to Andrews back in the day.

–Cliffy

And then there was the cringeworthy “Julia Roberts as Tess” stratagem in Ocean’s 12.

Steven Stayner had a non-speaking role as a cop in “I Know My First Name Is Steven,” a TV-movie based on his kidnapping.

Sophia Loren played herself as well as her mother in a 1980 biopic.

A little different than what the OP is asking for, but Band of Brothers episodes began with old men reminiscing about their EZ Company Days. The great thing was that they didn’t give their names til the final episode so you didn’t know which “character” they were.

Re: Geraldine Chaplin- she’s also a character (alright, an extra) in the movie. You see her in a stroller in one of the later scenes.

A stage version of this: Della Reese used to star in a touring musical play about Mahalia Jackson in which she played the title character, and a young actress played the young Della Reese (who toured with Mahalia in her early days).

It’s also been done on TV sitcoms a couple of times. Redd Foxx played himself and Fred Sanford in one episode of Sanford & Son and there are other examples also, just can’t think of them.

Alice herself also had a cameo in Alice’s Restaurant, along with many of the other people invovled. Arlo mentions it on the DVD commentary during the Thanksgiving fest scene.

Does this count? S.E. Hinton played a nurse in The Outsiders. She was the author of the novel from which the film was made.

There’s a surprisingly good (very good) TV movie available on DVD called Surviving Gilligan’s Island about the filming of that series. Bob Denver, Dawn Wells and Russell Johnson served as narrators in a documentary style format and were also (along with Tina Louise and the dead former castaways) portrayed by actors recreating the 1960s series. (The one who played Alan Hale was an absolute clone.)

In addition to Sonny Seiler, Jim Williams’ real life sister and niece (who own Mercer House) appeared as party guests in Midnight [etc.] though I don’t believe they portrayed themselves.

If we include authors… John Irving played a wrestling referee in The World According to Garp. Tama Janowitz had a cameo in Slaves of New York. Doug Kenny and Chris Miller were Delta brothers in Animal House. And Stan Lee is in many Marvel Comics movies.

In Blaze Lolita Davidovich played Blaze Starr and the real Blaze Starr played another (older) stripper named Lily.

24 Hour Party People has two cases of this. Paul Ryder of the happy mondays is played by Paul Popplewell, but appears in person as a thug. Also of course the main protagonist Tony Wilson (played by Steve Coogan) and has a cameo in person.

He plays the soldier in the wheelchair in the parade who flinches when the firecrackers are set off.

Donn Pearce, the author of the novel Cool Hand Luke played Sailor in the movie. (Apparently he didn’t think Paul Newman was right for the title role at all.)

Another author as extra: Terry Pratchett played a toymaker in the Hogfather movie.

In the original version of Hairspray, Buddy Deane (the man the character of Corny Collins is based on) plays a reporter at the Governor’s mansion.

I’m not positive about this one, but in the Andy Kaufman biopic Man in the Moon, Danny Devito plays Kaufman’s manager. At one point, they’re on the set of Taxi, but I can’t remember if a stand in for Devito (circa Taxi days) is used or not (I saw it a long time ago).

Real-life Doors drummer John Densmore played a recording engineer in The Doors.

ETA: And the real Paul Rothchild also appeared.

SE Hinton is a she? I should have known from the initials (only female authors use initials, to hide their femaleness), but I always thought she was a guy.