As I tried to inform you when you posted this the first time, what you experienced in this situation was unusual to say the least.
I purchased my iPhone at an AT&T Store and within the first two weeks or so I was experiencing occasional crackling with the earpiece during some calls. I knew at the time that AT&T does not handle any iPhone repairs or exchanges under warranty so I called AppleCare to handle the repair or exchange.
What this AT&T Store told you is correct. AT&T does not handle ANY iPhone repairs or exchanges under warranty but you can return an iPhone that was purchased at an AT&T Store to that store within 14 days of the purchase date for payment credit only. If the packaging is opened, a 10% restocking fee is charged and if the package is unopened, full credit will be issued. If not returned within the 14 day return for credit window, you own it regardless if the packaging is opened or not.
This 14 day return for credit window also applies to iPhones purchased at an Apple Store but Apple and Apple only handles all iPhone repairs or exchanges under warranty and per the written warranty if an iPhone is exchanged under warranty, a new or refurbished iPhone will be provided at Apple's discretion.
The problem you had was some misinformed employees at this Apple Store unless they misunderstood that you were looking for an exchange under warranty and you were not returning your iPhone for payment credit within the 14 day return window. If you were trying to return your iPhone for payment credit (not for an exchange under warranty), the Apple Store would have been right because in that situation you must return the iPhone for payment credit within the 14 day return window where the iPhone was purchased - in this case the AT&T Store.
It makes absolutely no difference where an iPhone was purchased in regards to a repair or exchange under warranty which is handled by Apple and Apple only, not AT&T.