Yes.
You can cancel a buy or sell order once it has been confirmed, so long as it has not yet been executed.
For U.S. stocks, trading hours are between 2:30 pm – 9:00 pm (UK time), and any buy or sell orders you place outside of these times will be queued and then executed once markets reopen.