They can detain you and have done that since the preclearance area is considered US soil.
They can only detain you until they hand you over to the Canadian police. [1]
Section (2) clearly states...
> (2) A preclearance officer is not permitted to exercise any powers of questioning or interrogation, examination, search, seizure, forfeiture, detention or arrest that are conferred under the laws of the United States.
[1] https://laws-lois.justice.gc.ca/eng/acts/P-19.32/FullText.ht...
Much like Trump's last term. He certainly said he would do a lot of things.