so many things here.
I'm 99% sure that you can't sublease the apartment. And even if allowed, you would STILL be 100% responsible for the rent if the sublease tenants didn't pay. And if you are allowed to sublease, usually the landlord needs to approve the sublease tenants first.
2nd, just by moving, you would still be responsible for the rest of the lease. Even if you are on a month to month, you need to give at least 30 days written notice (maybe more, read the lease). And this 30 days starts on the first day of the following month. Give your 30 day notice on August 2, it starts on Sept 1 and you have until Sept 30 to move. AND!!!!!!!!!! (this is very important), you owe until the end of Sept, even if you move out early.
It's nice you want to help your friend, but she is creating a lot of LEGAL problems for you. AND the landlord (or leasing person) is NOT at fault. Rules are rules.