Can sugar ruin an engine?

unless the car is a cake, yes..

Answer 2:
In cars there are multiple protections put in place to ensure that sugar does not get to the engine; fuel filters, oil filters, etc.

Putting sugar in the fuel tank would clog the fuel tank filter (tank sock), and or the fuel filter. Putting sugar in the oil would clog the oil filter (engage the bypass so oil would still flow). The engine may shut down, but little damage would incur from the act.