Because debts can be bought and sold, you have to be very clear as to who is doing what. Even your statement that an attorney is suing on behalf of someone else probably isn't strictly accurate. I suspect what you mean is that some "Collection Agency" (CA) now owns your debt, and that an attorney who is representing the CA has asserted to you (in writing and/or on the telephone) that the CA has already filed suit against you or is in the process of filing suit against you.
To restate that, either the attorney is the plaintiff and they are suing you on their own behalf because they own the debt, or the attorney is representing the CA who is the plaintiff that is suing you. But the attorney isn't suing you on behalf of the CA. It's a minor semantic point, but in these kinds of cases it can get very confusing very quickly if you're not clear who is doing what.
If the CA told you that you have to deal with their attorney that is representing them, then that is who you should deal with. Call the attorney and find out what they want to make it all go away. Don't send them any money unless they send you an agreement in writing saying what they will do upon receipt of that money. For instance, the agreement should say something like you will give them $x by such and such a date, and they will agree not to file suit, or they will agree to dismiss any suit already filed, etcetera).