Is it possible to generate the rational numbers similar to the successor function for natural numbers in this way:
$\bullet$ We know that the rationals can all be put in a sequence $a_0,a_2,...$ since there's a bijection from $\mathbb{N} \to \mathbb{Q}$ (let's consider $\mathbb{N}$ to also include $0$).
$\bullet$ We want to find a function $f:\mathbb{Q} \to \mathbb{Q}$ such that $a_0 = s$ and $a_k = \underbrace{f(f(...f(s)..))}_{k \ \text{times}}, k\geq 1$, where $s$ can be some rational number (doesn't matter which one, it could be, for example, $0$ as in the case of the natural numbers).
Yes, it is possible, and you've basically already done it. But it will not have some simple self-contained formula or expression, but rather a lengthy description, much like the one you already have there.
The shortest description I can think of is "Let $\{a_1,a_2,\ldots\}$ be an enumeration of the rationals. Define $f:\Bbb Q\to\Bbb Q$ by $f(a_i)=a_{i+1}$ for all $i\in \Bbb N$." If you want an explicit description so you can actually find function values, you will need an explicit description of the enumeration.