Etymologically attorney means a personal representative. US law maintains this usage only in “power of attorney” or attorney-in-fact for someone with a power of attorney.
The distinction between lawyer, counselor, and attorney-at-law has been collapsed in the US for centuries.
Some countries, like Australia, have a "split bar," where a solicitor can offer legal advice but only a barrister can represent clients before the tribunal. This is where the idea that there's a distinction between the two terms comes from. But the US has a unified bar, and there is no distinction.