PITTSBURGH—Bank of America Corp. apologized after its local contractor entered the home of a mortgage borrower when she was away, cut off utilities, padlocked the door and confiscated her pet parrot, Luke.

Angela Iannelli, 46 years old, alleged in a lawsuit Monday that the October incident—which separated her from her 11-year-old parrot for more than a week—caused so much "emotional distress" that she needed a prescription medication for anxiety.

A...