In tests like this you make it clear what's allowed - "use the standard library, no external dependencies" etc. Because in a normal working situation, his solution is perfectly valid.
If I were interviewing him it certainly wouldn't be a dealbreaker. I'd probably want to discuss more about pros and cons of in-house vs using libraries, because you tend to find out more about the skills and qualities of a developer from human conversation than scribbling on a whiteboard.
Maybe in company A they are looking for developers who come up with a solution on their own and don't rely on external libraries or Google. Maybe company B don't like developers reinventing wheels and prefer they at least research prior art first.
I don't know what kind of culture your company has, but at the very least out of courtesy you can signal what the requirements are in your test.
One has to ask, but then the mere act of asking might also annoy some interviewers.
I thought showing resilience by searching for an existing solution and implementing it, instead of reinventing the wheel, will give them a good impression. Clearly I was wrong.
But, when you come across a problem, what is the first thing you do? Try to find a solution and use that, or start from scratch every time? This costs money, time and manpower. Having someone who can solve a problem the fastest way possible without compromising the quality by using a known API which is used and tested by millions of others is the most effective way.
In my book it is a good solution. Believe me I worked with people who couldn't even do that and they are developers.
Their response lets their team dynamic and environment shine through. They came across an unexpected but valid solution and instead of accepting their question was beaten within the rules they rejected it. I'd wager they didn't fix the wording of the question afterwords either.
Reading people is a skill like any other, that must be learned like any other. Most people get lots of practice when young, but not getting this practice does not make you "stupid", it makes you lacking on a specific skill.