How do you carrier unlock a iPhone 7 for free?

My grandmother recently passed on, and my mother said she I could have her iPhone. When I put the sim card from my Verizon iPhone 6s into her AT&T iPhone 7 it said the sim card could not be activated. When I called AT&T, they said they couldn't because she didn't pay her phone bill (She was in the hospital for about 8 months and left her phone in her house). So, is there anyway I can do it myself for free?

Nope

The bill has to be PAID first

Pay the outstanding amount and whatever in takes to pay for the phone in full.

In order for AT&T to unlock the phone, it must be paid off completely.

This is from AT&T's webpage:

"AT&T denies unlock request
If we deny your request, to become eligible to unlock your device, you can:

Complete your contract or installment plan (including early termination fees).

Pay off an installment plan early and then make another unlock request after 24 hours.

If you upgraded your device before the contract or installment plan ended, wait 14 days after the upgrade to
unlock your old device. Business customers must wait 30 days.

AT&T (formerly GoPhone®) devices must complete at least 6 months of active service."

There's no way around that.

You can't unlock for free. You'd have to settle anything outstanding with Verizon/AT&T & see any eligibility afterwards.

The phone may well be IMEI locked.
In which case it us a brick.
You need to clear the debt with AT&T. The phone bill has 2 parts. A credit agreement on buying the phone. An airtime charge
The phone is not paid for. Her estate should settle that debt
Then AT&T may unlock the phone. If it has been IMEI locked for none payment it us bricked.

MAGIC