I have came up with the following theorem. Proof is quite long, but only because I wanted to make everything clear. Please let me know if you spot any mistakes.
Theorem. If for all permutations $σ : \mathbb{N} → \mathbb{N}$ we have
$$
\sum^∞_{n=1} |x_{σ(n-1)}-x_{σ(n)}| < ∞ \tag{1}
$$
then $f$ is of bounded variation ($f \in BV$).
Proof. Assume $(1)$. First, I will show, that $f$ is bounded.
For the sake of contradiction assume, that $f$ is unbounded. Clearly $f|_{\mathbb{Q} \cap[a,b]}$ is bounded, say, by $L > 0$. But since $f$ is unbounded, there is a sequence $(w_n)$ of irrationals in $(a, b)$ such that $f(w_n) → ∞$, $f(w_n) > 2L$ for each $n \in \mathbb{N}$ and $w_m \neq w_n$ whenever $m \neq n$. Thus, no mater how small the $δ > 0$ is, there exist a rational $q \in (w_k - δ, w_k + δ) \cap \mathbb{Q}$, such that $|f(w_k) - f(q)| > L$. Thus $\{w_n : n \in \mathbb{N} \}$ are points of discontinuity.
Let $(z_n)$ be a sequence in $[a, b]$ such that $z_n$ is some rational if $n$ is even (such that $z_{2m} \neq z_{2n}$ whenever $m \neq n$), and $z_n = w_n$ if $n$ is odd. Since $|f(z_{n-1}) - f(z_n)| > L$ and $\{ z_n : n \in \mathbb{N} \} \subset I$ we have for some permutation $σ$ for which
$$
∞ = \lim_{n → ∞} n L ≤ \sum^\infty_{n = 1} |f(z_{n-1}) - f(z_n)| ≤ \sum^∞_{n=1} |x_{σ(n-1)}-x_{σ(n)}|.
$$
Which is a contradiction.
Now I will show, that $f \in BV$. Let
$$
a = r_0 < r_1 < \dots < r_n = b
$$
be an arbitrary partition denoted by $P'$. Construct partition $P$ in the following way. Let $a = p_0, b = p_n \in P$. For $i=1,2, \dots, n-1$
- If $r_i$ is a discontinuity point of $f$, then let $r_i=p_i \in P$.
- Otherwise $r_i$ is a continuity point. Thus there is rational $p_i \in (r_{i-1}, r_i) \cap \mathbb{Q}$ such that $|f(p_i) - f(r_i)| < ε$ for any $ε> 0$.
Thus $|f(r_{i-1}) - f(r_i)| < |f(p_{i-1}) - f(p_i)| + 2ε$ for $i = 1, 2, \dots, n-1$.
By construction $P$ is a finite partition of $[a, b]$. Moreover $P \subset I$. Since $f$ is bounded there exist $N > 0$ such that, for any partition $P'$, we have that $|p_0 - p_1|, |p_{n-1} - p_n| ≤ N$. Therefore
$$
\begin{align}
\text{var}(f, P) &= \sum^n_{i=1} |f(r_{i-1}) - f(r_i)|\\
&≤ 2N + \sum^{n-1}_{i=2}|f(r_{i-1}) - f(r_i)| \\
&≤ 2N + \sum^{n-1}_{i=2}2ε + |f(p_{i-1}) - f(p_i)| \\
&= 2N + 2nε + \sum^{n-1}_{i=2}|f(p_{i-1}) - f(p_i)|.
\end{align}
$$
Now let $ε = 1/2n$ and $σ$ be such that $x_{σ(i)} = f(p_i)$ for $i \in \{ 0,1, \dots, n\}$. We have
$$
\begin{align}
\text{var}(f, P) &≤ 2N + 2nε + \sum^{n-1}_{i=2}|f(p_{i-1}) - f(p_i)| \\
&= 2N + 1 + \sum^{n-1}_{i=2}|x_{σ(i-1)} - x_{σ(i)}| \\
&≤ 2N + 1 + M \\
&< ∞
\end{align}
$$
Since for every finite partition $P$ the $\text{var}(f, P)$ is bounded by $2L + 1 + M$, the supremum is also bounded. Thus $f \in BV$.
Examples. Note that this is quite a weak theorem as it can be applied to very narrow subset of functions with two sided limits. For example constant functions and nonnegative functions with countable support (with two sided limits) like
$$h(x) =
\begin{cases}
\frac{1}{n^2} &\text{when } x = \frac{1}{n} \text{ for some } n \in \mathbb{N} \\
0 & \text{otherwise}
\end{cases}
$$
are in this set. But there are typical examples of functions of bounded variation, like $g(x) = x$ for which we cannot use the theorem as $(1)$ explodes.