In Jech's book Set Theory, the author defines definable over a model:
$$\text{def}_A(M) = \{X \subseteq M : X \text{ is definable over }(M,\epsilon,A \cap M)\},$$
where $A \cap M$ is considered a unary predicate. So let $X$ be a definable set over $(M,\epsilon,A \cap M)$; in other words, there exist a formula $\varphi$ and $a_1, \ldots, a_n \in M$ then there exists a formula $\varphi$ such that $X = \{x \in M : (M,\epsilon,A \cap M) \models \varphi(x,a_1, \ldots, a_n)\}$.
Does this mean that $a_i \in A \cap M$ for $I = 1, \ldots, n$? I am not sure what is the role the unary predicate $A \cap M$ plays in this definition. Any help will be appreciated.
It's an extra predicate you have in building the formulas. So for instance, $\varphi(x,a)$ could say $x\in a\land A(x)$ which is interpreted in $(M,\in, A\cap M)$ as meaning $x\in a\land x\in A\cap M,$ so e.g. this defines the set $X=(a\cap M)\cap (A\cap M).$