Yes, they could, that is the definition of at-will employment. As long as the termination reason is not illegal there is nothing stopping them. Some employers will escort you out of the building immediately once you let them know you plan to leave, I know multiple examples of this happening at Microsoft at least.