For non-citizens, yes. But they cannot deny entry for US citizens, and they cannot detain citizens indefinitely.
If you have any doubts about that, you should visit a US-Canada border crossing. The overwhelming majority of travelers are not subjected to through inspection.