Yes, orders can be cancelled as long as they have not yet been matched. If the order has been partially filled, you can only cancel the unfilled portion. During the Market Posting (Pre-Open and Pre-Close) periods and off-hours, no orders can be cancelled.
Note: There are no fees for canceling/editing orders. Only filled transactions are subject to broker's fees