Dear student,
Yes, we can obtain NH3 on the decomposition of ammonium salts
for eg.
NH4Cl ----> NH3+HCl
But that's also true not all ammonium salts decompose to give ammonia gas, eg. NH4NO3.
In nutshell, ammonium salts on heating decompose to give ammonia but not every time (exceptions exists)
Regards