This is a genuine product that was sold by Mattel. The vintage Ken doll website Somethingaboutaboy.com writes that Allan was first introduced in 1964:
Allan was introduced in the Barbie Fan Club March/April magazine, but his first appearance in the store catalogues (that I’ve discovered so far) is in the Aldens catalogue for Fall Winter (and of course Mattel’s own Barbie For Fall ’64 trade catalogue). His first TV commercial can be seen on Youtube. He came with his own unique beach outfit with blue sandals, black wire stand and booklet. He was marketed as Ken’s Buddy and (to a lesser extent) the boyfriend of Midge. His body is identical to Ken’s, so they could share clothes. No other clothing was designed specifically for him, but the 1966 outfit Best Man #1425 is traditionally his by association, despite the fact that he was discontinued in the USA during 1966. All Allans were made in Japan. His jacket has an Allan label, and he was given an Allan wrist tag, both of which can be seen in detail in the THE VINTAGE KEN® BOOK.
Pictures of the Allan doll have gone viral a few times on social media, as many people believe that Ken, Mattel's famous doll who has historically been marketed as Barbie's boyfriend, is actually gay. Some argue that Ken having a "buddy" named Allan supports this theory. When a picture of Allan went viral in 2020, the website Pride.com wrote:
We already knew Mattel's Ken doll has a very hilarious, very queer history, but in case you needed more proof that the Barbie character is an inadvertent gay icon, here's a new development for you.
In a now viral post from Twitter user @byelacey, Barbie fans old and new are being introduced to Allan, a handsome, brown-haired, and strapping vintage doll who serves as a companion to our gay icon Ken. Mattel literally describes Allan on his box as Ken's "buddy" (hmmm, that's one coded, roundabout way to say boyfriend!), and to prove just how great their buddy relationship is, the longtime toy manufacturer also pointed out that all of Ken's clothes fit Allan perfectly! 'Cause that's what great bros and "buddies" do, right?! Share 'fits!!
We simply do not have the resources to verify the sexual preference of these Ken and Allan dolls. We can say that we found a few advertisements for these dolls from the 1960s, and in both cases Ken was marketed as Barbie's boyfriend while Allan was marketed as Ken's best buddy. In one of the advertisements, you can also see Barbie's friend "Midge."
It doesn't appear that Allan dolls are still regularly available made by Mattel, but the company has released a few collector versions of these dolls over the years. The picture at the top of this article, for example, comes from a 50th anniversary set that was sold in 2014.
The following video comes from the YouTube page Barbie Collector and supposedly shows the first commercial for Ken's buddy Allan.