Yes they can the only thing you can't do is keep them in a cage alone there has to be more than one in each cage otherwise they will die from lonliness.
It is illegal to capture and keep wild birds as pets. A bird that is accustomed to living in the wild wouldn't be happy confined to a cage. If you find an injured bird, contact a wildlife rehabilitation specialist.