The artist's name is mentioned in their song, by somebody else.

There are songs in which a singer calls out his or her own name (David Allen Coe’s You Never Even Call Me By My Name, e.g.), and songs which share the name of the band that plays them (Bad Company, Big Country). There are also many, many examples of singers mentioning other singers. I’m not talking about those.

I’m talking about a guest vocalist, or someone else who is* not *the main artist, name-checking an artist right in that artist’s song.

Here are some examples:
“Shakira, Shakira…” in Hips Don’t Lie.
“Chaka Khan, Chaka Khan, let me rock you, Chaka Khan…” in I Feel For You.
“Viva Carlos Santana” in Maria, Maria.

What else?

White Stripes - “Well It’s True That We Love One Another” (“I like Jack White like a little brother…”)
Van Halen - “Unchained” (“Come on, Dave, give me a break”)

Kanye, all through his work. For example, he gets name checked a number of times in “Monster”:

Probably not exactly what you’re looking for, since it’s not a “guest vocalist,” but in Queen’s The Invisible Man, Freddie Mercury names the other three members of the band (John Deacon, Brian May, and Roger Taylor), while Taylor names Mercury.

It’s Five O’clock Somewhere has Alan Jackson wondering what Jimmy Buffett would do at a moment like this. Jimmy then proceeds to inform him about what he would do. Large quantities of alcohol may or may not be involved:)

Does Sly calling out Cynthia & Jerry count?

Nm, misread

nvm

Nosaj the Great guest-rapping on Big Calm by Morcheeba: “Super rocket, Nosaj the Great, and Morcheeba, how much more can you take?”

Well, I don’t know if it counts, but on the Band’s “4% Pantomime” with guest singer Van Morrison, a duet between Van and Richard Manuel to be precise, Richard Manuel sings:

Oh, Belfast cowboy, lay your cards on the grade
Oh, Belfast cowboy, can you call a spade a spade?

(Belfast cowboy being the OTHER nickname of Van Morrison)

and Van answers:

Oh, Richard, tell me, tell me
Tell me, is this game poker?

In “Soul Man,” both the Sam and Dave and the Blues Brothers versions, call out “Play it, Steve,” for Steve Cropper, who played on both versions.

In the song “Creeque Alley” by the Mamas and the Papas, not only are all four members of that group mentioned, but so are Zal Yanovsky, John Sebastian, Roger McGuinn. Barry McGuire, and the groups called the Mugwumps and the Loving Spoonful:

https://www.creequealley.com/

In the song “I Dig Rock and Roll Music” by Peter, Paul and Mary, the groups the Mamas and the Papas and the Beatles, as well as Donovan are mentioned.

In the song Crazy Little Thing Called Love by Queen the lead singer Freddie Mercury sings the line “Until I’m ready” which is followed by the other band members singing in harmony “Ready Freddie.

TCMF-2L

Edited to note this is another example where it’s not a full ‘outsider’ naming Freddie

I think this one matches the OP although it is a bit grubby.

After lead singer Johnny Rotten and bassist Sid Vicious had left British punk band The Sex Pistols, the drummer and guitarist Cook and Jones recorded No One Is Innocent with fugitive train robber Ronnie Biggs as lead vocalist. The chorus, which sounds like it’s mainly Cook and Jones singing, has “Ronnie Biggs was doing time until he did a bunk.”

TCMF-2L

I feel like there should be many examples with Dr Dre, e.g in “Forgot About Dre”:

Eminem: Nowadays everybody wants to talk like they got something to say / But nothin comes out when they move they lips / Just a buncha gibberish / And muthafuckas act like they forgot about Dre

Another slightly grubby one.

A live version of the Elton John song Don’t Let The Sun Go Down On Me was recorded as a duet between George Michael and Elton John and was a hit single. It was credited as a duet although recorded during Michael’s tour where he was doing mainly cover versions. So you could argue it is, in this context, a George Michael cover of the song with Elton merely guesting on it.

Whatever, Michael includes the mid song introduction “Ladies and Gentlemen, Mr Elton John.”

TCMF-2L

Tragically Hip - “New Orleans is Sinking”

She said, "Gordie, baby, I know exactly what you mean

Sweet - “Ballroom Blitz”

Are you ready Steve? Uh-huh
Andy? Yeah
Mick? Okay
Alright fellas, let’s go!

Motley Crue’s cover of “Smokin’ in the Boys Room” ( the original by Brownsville Station does not use band member names)

My buddies Sixx, Mick & Tom

Motley Crue - “Girls, Girls, Girls”

Hey Tommy, check that out man!
What, Vince, where?

NOFX - “Theme from a NOFX album” - each verse is about a band member

That’s Erik our drummer his fathers a plumber…
El Hefe is not satanic he’s one hip hispanic…
That Melvin on six string “some tell me I can’t sing”…
My name is Fat Mike I’m obsessed by big lesbians…

Still can’t find a definitive answer to the OP but another slightly dodgy example.

Boyband 5ive released a version of Queen’s We Will Rock You with new verses and featuring Queen guitarist Brian May and Queen drummer Roger Taylor (although neither sing on the track.) The boys from 5ive sing lyrics including “Watch your back. We got Queen on this track.”

TCMF-2L

It’s Still Rock and Roll to Me - Billy Joel says “All right, Rico!” to kick off the sax solo. “Rico” is Richie Cannata, Joel’s sax player for years.