Only on an air cooled engine especially in warm weather while under load. Hot temperatures, high engine loads, carbon build up on pistons all contribute to possibility of detonation which is harmful to an engine. High octane helps reduce the risk of detonation in these circumstances.
If the engine is watercooled then not so much with a low compression head.
Also remember that adding oil to gasoline reduces its octane rating which can also lead to detonation.