Sure, I was locked up by DHS/immigration, and I am a US citizen. CBP/ICE/HSI doesn't really need much of anything to lock you up, when they did it to me they told me I wasn't even under arrest.
IANAL but there are different categories like "detained" [reasonable suspicion, for questioning] and "arrested" [probable cause], and that's why the common advice is to just ask "am I free to go", which doesn't get bogged-down on finer-grained distinctions about why you might no be.