ANFO is 90%+ Ammonium Nitrate (NH4NO3) and <10% diesel oil or similar. The diesel can be washed off with any non-polar solvent, and after drying the ammonium nitrate, it is treated with a concentrated solution of sodium hydroxide:
NH4NO3 + NaOH(aq) -> NaNO3(aq) + NH3(g)
The gas is then dried (KOH or NaOH drying tower) and condensed (dry ice cooler). There you have your anhydrous ammonia.
Now, as this is rather off topic after you have gotten your answer, I'll close this thread.