You definitely can cancel an attack/construction/upgrade/Lost Art discovery by clicking icon within 50 seconds after its initiation.
However, you should be aware that you will recover 80% of resources which were used for any resource-based action. Be wise with the "cancel" option!