The answer is yes, already for an affine variety.
The following example is taken from Dimca's book Singularities and topology of hypersurfaces, see page 102 and page 105. We work over $\mathbb{C}$.
Let $V \subset \mathbb{P}^n$ be a hypersurface and $U:=\mathbb{P}^n \setminus V$ its complement. Since $V$ is very ample, $U$ is an affine variety. Then we have the following
Proposition. Assume that $V$ has $k$ irreducible components $V_1, \ldots, V_k$ with $\deg V_i =d_i$. Then $$H_1(U, \mathbb{Z})=\mathbb{Z}^{k-1} \oplus \mathbb{Z}/d \mathbb{Z},$$ where $d$ denotes the greatest common divisor of the integers $d_1, \ldots, d_k$.
If moreover $V$ has only normal crossing singularities in codimension $1$, then $\pi_1(U)$ is abelian, hence it is isomorphic to the group $H_1(U, \mathbb{Z})$ given above.
In particular, if $V$ is irreducible and normal of degree $d$, one has $$\pi_1(U)=\mathbb{Z}/d \mathbb{Z}.$$
Remark. If $V$ is irreducible of degree $d$, then the Proposition above implies that in any case the abelianization of $\pi_1(U)$ is isomorphic to $\mathbb{Z}/d \mathbb{Z}$. However, when $V$ is not normal crossing in codimension $1$, the group $\pi_1(U)$ may be nonabelian (and also infinite). Let me give a couple of classical examples, that can be found in Dimca's book, Chapter 4.
Example 1. Let $V \subset \mathbb{P}^2$ be the tricuspidal quartic curve of equation $$x^2y^2+y^2z^2+z^2x^2-2xyz(x+y+z)=0.$$ Then $\pi_1(U)$ is isomorphic to the metacyclic group of order $12$. This is a finite nonabelian group, whose abelianization is $\mathbb{Z}/4 \mathbb{Z}$.
Example 2. Let $V \subset \mathbb{P}^2$ be the plane sextic of equation $$(x^2+y^2)^3+(y^3+z^3)^2=0.$$ $V$ has six cusps situated on a conic and $\pi_1(U)=(\mathbb{Z}/2 \mathbb{Z}) \ast (\mathbb{Z}/3 \mathbb{Z})$. This is an infinite, nonabelian group whose abelianization is $(\mathbb{Z}/2 \mathbb{Z}) \times (\mathbb{Z}/3 \mathbb{Z})= \mathbb{Z}/6 \mathbb{Z}$$(\mathbb{Z}/2 \mathbb{Z}) \oplus (\mathbb{Z}/3 \mathbb{Z})= \mathbb{Z}/6 \mathbb{Z}$.