solvedy with Archit,Adhitya,Rushil and Ananda:
Let's consider $\mathbb{F}_2$.
Let $P_i = 1+x+x^2+\dots+x^i$. Since there are finitely many elements in $\mathbb{F}_2[x]/(1+x^a+x^b)$ i.e. $2^b$ elements, $\exists i> j$ s.t. $ P_i \equiv P_j($mod $1+x^a+x^b)$ in $\mathbb{F}_2$. Hence as $x$ is coprime to $(1+x^a+x^b)$ in $\mathbb{F}_2$, $P_{i-j} \equiv \frac{P_i-P_j}{x^j}\equiv0 ($mod $1+x^a+x^b)$. Let $n = i-j$.
So, there is a polynomial $Q$ in $\mathbb{F}_2[x]$ s.t. $(1+x^a+x^b)Q = P_n$.
Now let's create the coefficients of a polynomial $Q'$ in $\mathbb{Z}[x]$ in a recursive way :
-> For $i = 1,2,3,...$:
1. if $[x^i]Q = 1$ then choose $[x^i]Q' = -1$ if $[x^{i-b}]Q,[x^{i-b+a}]Q$ are both $1$ and $[x^i]Q' = 1$ otherwise.
2. if $[x^i]Q = 0$, just choose $[x^i]Q' = 0$.
This ensures that all coefficients of terms with power $\leq n$ of $(1+x^a+x^b)Q'$ are in $\{-1,1\}$ and we are done!