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.
One year of training is also confirmed by Chariots for Apollo:
In June, NASA announced that 6 scientist-astronauts had been chosen from 16 nominated by the science board. In the group were one geologist (Harrison H. Schmitt), two physicians (Duane E. Graveline and Joseph P. Kerwin), and three physicists (Owen K. Garriott, Edward G. Gibson, and F. Curtis Michel). Two of the men, Kerwin and Michel, were qualified jet pilots, but the others were not. These four reported to Williams Air Force Base, Arizona, on 29 July for a year of flight training before joining their colleagues in Houston.
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.