First, you cannot apply for naturalization while abroad. You must be a resident of the U.S. in order to apply for naturalization and apply from within the U.S.
You have to look at the context in which the lawyer is answering. Yes, he's correct that you cannot apply outside of US if you don't reside in US. However, there's nothing that says you can't apply from outside US if you have maintained state/district residency ties.
Resident and residency can mean many things, but can't always be used interchangeably.
Example:
Legal permanent resident
Continuous residency
State resident