You basically want to know whether $-q$ is an eigenvalue of $P$. This is true if and only if $k_P(-q) = 0$, where $k_P(x) = \det(x I-P)$ is the characteristic polynomial of $P$. Since $P$ has integer coefficients, we have $k_P \in \Bbb{Z}[x]$ and it is a monic polynomial with $\deg k_P = n$ so clearly if $q$ not an algebraic integer or is an algebraic integer of degree $> n$ then $-q$ cannot be a zero of $k_P$ so $P+qI$ is invertible.
On the other hand, if $q$ is algebraic of degree $\le n$, then let $p(t) = c_0 + c_1 t + \cdots + c_{k-1}t_{k-1} + t^k \in \Bbb{Z}[x]$ be the minimal polynomial of $-q$ with $k \le n$. You can check that the $n \times n$ matrix
$$P = \begin{bmatrix}0 & 0 & \cdots & 0 & -c_0 & 0 & 0 & \cdots & 0\\ 1 & 0 & \cdots & 0 & -c_1 & 0 & 0 & \cdots & 0\\ 0 & 1 & \cdots & 0 & -c_2 & 0 & 0 & \cdots & 0\\ \vdots & \vdots & \ddots & \vdots & \vdots & \vdots & \vdots & \ddots & \vdots \\ 0 & 0 & \cdots & 1 & -c_{k-1} & 0 & 0 & \cdots & 0 \\ 0 & 0 & \cdots & 0 & 0 & 1 & 0 & \cdots & 0\\ 0 & 0 & \cdots & 0 & 0 & 0 & 1 & \cdots & 0\\ \vdots & \vdots & \ddots & \vdots & \vdots & \vdots & \vdots & \ddots & \vdots\\
0 & 0 & \cdots & 0 & 0 & 0 & 0 & \cdots & 1 \end{bmatrix}$$
has $k_P(x) = p(x)(x-1)^{n-k}$ so $k_P(-q)=0$ and therefore $P+qI$ is not invertible.
For your $2 \times 2$ example, your analysis is wrong, for example $\sqrt{2}$ is an algebraic integer with minimal polynomial $x^2-2$ so for $$P = \begin{bmatrix} 0 & 2 \\ 1 & 0 \end{bmatrix}$$
we have that $P+\sqrt{2} I$ is not invertible. Also for any $P$ and $q = \frac12$ (which is not an algebraic integer), we have
$$\det \left(P+\frac12 I\right) = \left(a+\frac12\right)\left(d+\frac12\right) - bc \in \Bbb{Z}+\frac14$$
so it is nonzero and hence $P+\frac12 I$ is invertible. Similarly, for any $P$ and $q = \sqrt[3]{2}$ which is an algebraic integer of degree $3$, you can check that $P+\sqrt[3]{2} I$ is invertible.