You can, but the required length for AM needs to be pretty long - as much as a hundred feet for full effectiveness, but you may be able to get away with like 10 feet or so, less is going to mean less sensitivity. There's even some value of using a longer wire and having the amount you can't extend fully in a coil at the base near the receiver (inductive loading).
That said, there are ways of getting around raw length by using more complex antenna designs, so there are compact commercial designs that aren't too expensive if the length of wire option isn't sufficient.