Yes, it is absolutely possible that a variable is both a confounder and an effect modifier. We can run a quick simulation in R to verify this: Consider the following mechanism with $x$ being the treatment and $y$ the outcome. $c$ influences both $x$ and $y$ and, therefore, it is a confounder. But it also interacts with x and so modifies its effect on y.
set.seed(234)
c <- runif(10000)
x <- c + rnorm(10000, 0, 0.1)
y <- 3*x + 2*x*c + rnorm(10000)
So we know the true causal mechanism is $y = 3*x + 2*x*c$. Clearly, $c$ modifies the effect of $x$. However, when we run the regression of $y$ on $x$ only, we also see the confounding kicking in:
lm(y ~ x)
Coefficients:
(Intercept) x
-0.258 4.856
Finally, as pointed out in my comment, the definition given by oisyutat is wrong. It mirrors what Judea Pearl calls "the associational criterion" for a confounder, and he gives multiple reasons for why this definition fails. See Pearl (2009), Causality, section 6.3.