Yes! You can cancel any action within 60 seconds of starting said action. In order to cancel a battle action, go first to your Keep, open the "In Transit" tab, and then tap on the red "X" button to the left of the corresponding progress bar. You can also cancel an action by tapping on the red "Cancel" button in the "In Transit" tab of the Action panel on the bottom of the screen.
In order to cancel a Building construction or upgrade, tap on the Building concerned, and then tap on the red "X" button to the left of the progress bar. Once canceled, you'll get back 80% of the Resources you spent on this construction or upgrade. You can also access the Building you need in the "Construction" tab on the Action panel.
Moreover, there are special Items called "Instant Recall" with which you can recall Units and Caravans that haven't reached their destination yet. You can get one of these in the Misc. tab of the Black Market.