Is it possible that under certain conditions, the value of $X$ in the following equation is different on each side such that by eliminating it the value of the two sides are no longer equal?
$$(a+b) - X = (p+q) - X$$
$$(a+b) \neq(p+q)$$
But introducing X on each side results in an equation.
No, this is not possible. Whenever you use any symbol, it should be clearly stated what that symbol represents and it should refer to one object only. It might be fixed number, or it may be some variable, but it can't change meaning before you are done with whatever you are trying to do.
If you want to write something similar to allow different values on each side, use a different alphabet letter, like $Y$:
$$(a+b) - X = (p+q) - Y.$$
It might be that $X\neq Y$, but it's not necessary. Different letters don't exclude possibility $X = Y$. However, $X = X$, no flexibility here.