Can an animal commit copyright infringement?
A non-human animal does not have legal capacity to sue or be sued, and is not capable of being guilty of a crime.* Since these are the only ways that copyright infringement can be enforced, a non-human animal cannot have liability, either criminal or civil, for copyright infringement.
For what it is worth, plants likewise cannot have liability, either criminal or civil, for copyright infringement.
This said, under some circumstances, one can image that work literally done by an animal can be attributed to a human author.
For example, if a human author samples and edits of composition of animal sounds, even if there are no human created sounds in the final work, it would still be a work of human authorship.
On the other hand, there are documented examples of bird songs in a particular place being derived from human musical compositions that were played in the presence of the ancestors of the current birds. The birds can't be punished under copyright laws for copying the human songs that they copied, and derived their own songs, from in that case.
Likewise, a purely human musical composition derived from a birdsong, is not copyright infringing.
- This rule is basically universal in all modern legal systems that have copyright laws. But there have been a handful of outlier/flunk incidents in human history in which non-human animals have been made defendants in criminal trials, convicted, and sentenced in some way (usually executed) for crimes. These incidents almost always occurred at the dawn of modern legal thought, usually prior to the 19th century, and were exceeding rare even then. But, the time frame in which legal systems have had copyright laws, and the time frame in which there were isolated instances of criminal punishments of non-human animals, have almost no overlap.