Yes, you are still in a tenancy agreement even if the property is sold. The agreement passes to the new owner. All the terms remain the same. The new owner is buying the property plus you as a tenant in situ.
Contrary on another answer on here, a tenancy agreement is a legal document. If you break the agreement by leaving early for instance, the landlord can still charge you rent plus other costs (such as advertising costs etc) until a new, suitable tenant is found. Also, I don't know why anyone would advise you not to pay the last month's rent? Again, you would be breaking your agreement and the landlord will take you to Court for the money.
Having said that, there is no harm in negotiating if you wish to get out of the agreement. The new landlord may wish to get rid of you too so you may reach a mutual understanding. Just do it properly then you wont end up in Court paying damages to the landlord.