Generally when $X$ and $Y$ are independent discrete random variables, we can say that:
$${\rm Var}(X + Y) = {\rm Var}(X) + {\rm Var}(Y)$$
What would be an example of a random variable for which
$${\rm Var}(X + Y) \not= {\rm Var}(X) + {\rm Var}(Y)$$
Generally when $X$ and $Y$ are independent discrete random variables, we can say that:
$${\rm Var}(X + Y) = {\rm Var}(X) + {\rm Var}(Y)$$
What would be an example of a random variable for which
$${\rm Var}(X + Y) \not= {\rm Var}(X) + {\rm Var}(Y)$$
On
It's enough to find any two variables $X, Y$ where $\operatorname{Cov}(X, Y) \neq 0.$ This follows from the general expansion of $\operatorname{Var}(X + Y)$, as
$$\operatorname{Var}(X + Y) = \operatorname{Var}(X) + \operatorname{Var}(Y) + 2\operatorname{Cov}(X, Y)$$
which follows straight from the definition via the sums.
On
Remark that if $(X_{j})_{1\leqslant j\leqslant n}$ is a sequence of random variables and $\alpha_{j}\in \mathbf{R}$ then $${\rm Var}\left(\sum_{j=1}^{n}\alpha_{j}X_{j}\right)=\sum_{j=1}^{n}\alpha^{2}_{j}{\rm Var}(X_{j})+2\sum\sum_{1\leqslant j< i\leqslant n}\alpha_{j}\alpha_{i}{\rm Cov}(X_{j},X_{i}).$$ In particular with $n=2$ and $\alpha_{j}=1$ we have $${\rm Var}(X+Y)={\rm Var}(X)+{\rm Var}(Y)+2{\rm Cov}(X,Y).$$
If $X$ and $Y$ are indepent random variables, so ${\rm Cov}(X,Y)=0$, then in particular $${\rm Var}(X+Y)={\rm Var}(X)+{\rm Var}(Y).$$ The contrapositive that is logically equivalent to the statement is: if ${\rm Cov}(X,Y)\not=0$, so $X$ and $Y$ is not independent.
Then your example can be constructed with random variables dependents. For example, consider the random variables $X$ and $Y$ with joint density given by $$f(x,y)=\begin{cases}3x,\quad 0\leqslant y\leqslant x\leqslant 1,\\ 0,\quad \text{otherwise}\end{cases},$$ then $${\rm Cov}(X,Y)=\mathbf{E}[XY]-\mathbf{E}[X]\mathbf{E}[Y]=(3/10)-(3/4)(3/8)=3/160\not=0$$ so in particular $${\rm Var}(X+Y)\not={\rm Var}(X)+{\rm Var}(Y).$$ Now, find ${\rm Var}(X+Y),{\rm Var}(X)$ and ${\rm Var}(Y)$.
Choose $X=Y$. Then, we have $\mathrm{Var}(X+Y) = \mathrm{Var}(2X) = 4\mathrm{Var}(X)$. Hence, unless $\mathrm{Var}(X)=0$, the equality $\mathrm{Var}(X+Y) = \mathrm{Var}(X) + \mathrm{Var}(Y)$ does not hold.