Under Rule 17 If the engine was running, and CAPABLE of attaching to a propeller, then you are a power driven vessel at the touch of a control. And therfore CAPABLE of maneuvering as one, and avoiding collision as one.
From a practical point of view if i'm in a motor boat and see a boat with sails up that presents a risk of collision I'm not likely to be able to see the stern.
If it has sails up I have to assume it is a sail boat.
Most boats do not pump cooling water over the front of the boat.
There is also the legal concept of the prudent mariner combined with the concept that if you are in doubt give way.
It would be a pretty tough sell to tell the judge that you held course against a sailboat with sails up because you thought they had their motor on.
Between sailboats the law specifically says that for the purpose of the rules the wind is deemed as coming from the side of the boat opposite from the side the boom is on even if you are in reality sailing by the lee.
If you look like a sailboat it is probably best to act like one.
If you look line you are on a port tack you should act like someone on a port tack.