Geologist Harrison Schmitt was Lunar Module Pilot for Apollo 17 and the last person to arrive on the moon. He was the only real scientist to walk on the moon.
Schmitt had all of the training that other Apollo astronauts received, and was qualified to fly both the CM and LM. However, he was the first astronaut who hadn't previously been a military pilot (and prior to Apollo 17, all had been military test pilots). His Wikipedia article notes:
Following his selection, Schmitt spent his first year at Air Force UPT learning to become a jet pilot.
However, that doesn't tell me if he completed military pilot training, or if he had a civilian pilot's license.
At the time of Apollo 17, was Schmitt legally a pilot (i.e. military certification or a civilian license)? He may have met NASA's requirements, but that's not what this question is about. If not, perhaps that would make him NASA's only pilot-class astronaut who wasn't legally a pilot.