Well, Refined Cocaine didn't exist prior to 1860, and was mostly a sort of curiosity in the medical world for the next two or so decades. After that, it was marketed as an anesthetic for a few years.
Freud wrote a paper about the joys of recreational use of cocaine in 1884 (he was 24), and then struggled with addiction for the next 12 years.
Then Coca-Cola was created in 1886, and bottled for mass consumption shortly afterward. They removed the cocaine from the recipe in 1903...
Then the Harrison Narcotics act was passed in 1914, effectively banning cocaine and opium. Mostly based on racist fears that black people liked cocaine.
So, it's possible that some cocaine was in the White House as early as the 1880s, especially in some Coca-Cola, but the drink was considered low class, and cocaine was also a bit of a low class drug...
So yeah, It's very hard to say.
As to WW2 and beyond. Well, Meth was invented about that time frame. 1940s Germany, and the entire Nazi military were all addicted to meth in the form of Pervitin, the brand name that it was sold under. Pervitin was literally issued to infantry to let them march for days at a time, and was a huge part of the initial Blitz.
The Allied forces had their own versions of speed to issue to soldiers.