Octane is real. It may or may not be an ingredient in the gasoline you buy."Octane's" are not a physical thing or object.
Which is why they call it an Octane RATING. The gasoline is compared to a controlled, measured mix of Octane and other chemicals, and would have the same resistance to detonation as that certain percentage of Octane. For example, if the gasoline runs in a test engine with the same resistance to detonation as 87% Octane, the rest "other stuff", = gasoline with an 87 "Octane" rating.
Research done by General Motors in the 1910s, commercially available in gasoline by the early 1920s, but the chemical was known decades before--it just wasn't used in gasoline.The Germans (?) figured out how to add lead to gasoline to increase the resistence to preignition.