Sure. Turning the engine is going to take energy one way or the other. But you can use energy that would otherwise be wasted heating up the brake pads rather than energy from burning fuel.
So if you're coasting you're spending fuel to increase your speed (relative to what you'd do by staying in gear). In the situation where you're considering coasting that's probably not a tradeoff you want to be making.
... which brakes the car, so you still lose energy.
Can't find literature at the moment, but ISTR that the valve train can take several kW to operate.