In his notes, Ravi Vakil only defines the notion of an effective Cartier divisor. Furthermore, the Wikipedia page only defines the notion of an effective Cartier divisor for a general scheme. However, obviously, the notion of a general (not-necessarily-effective) Cartier divisor exists in other contexts (even it seems for algebraic varieties).
Can one define the notion of a (not-necessarily-effective) Cartier divisor for a general scheme, or does only the notion of effective Cartier divisors make sense?
Yes, see the stacks project.
Let $K^{pre}$ be presheaf defined as follows : for an open set $U$, let $S_U \subseteq O_X(U)$ be defined as : $a \in S_U$ iff for all $p \in U$, $a|_p$ is not a zero divisor in $O_{X, p}$. Then, $K^{pre}(U) = S_U^{-1}O_X(U)$.
Let $K$ be its sheafification. Note that there is an injective morphism $O_X \rightarrow K$. Then, take group of units and take quotients. We get this exact sequence:
$$0 \rightarrow O_X^* \rightarrow K^* \rightarrow K^* / O_X^* \rightarrow 0$$
A Cartier divisor is a global section of $K^* / O_X^*$.