This is a classical consequence of the Chinese remainder theorem.
Denote by $p_1,p_2,\ldots,p_r$ the prime divisors of $b$.
For each $i$, $p_i$ does not divide both $a$ and $N$.
I claim that there is a $x_i\in{\mathbb Z}$ such that $a+Nx_i$ is not
divisible by $p_i$.
Indeed, if $p_i$ divides $N$ then it does not divide $a$ by the
above so any $x_i$ will do. If, on the other hand, $p_i$ does not divide
$N$, then $N$ is invertible modulo $p_i$ and we have an $x_i$ such
that $a+Nx_i\equiv 1 \ ({\sf mod} \ p_i)$.
By the Chinese remainder theorem, there is an $x\in{\mathbb Z}$ such
that $x\equiv x_i \ ({\sf mod} \ p_i)$ for every $i$. This $x$ will do.