This essentially boils down to the case of a cyclic group. For a cyclic group of order n, the irreducible representations correspond to the action on $\mathbb Q[\omega_d]$ where $\omega_d$ is a primitive $d^{th}$-root of unity where $d$ divides $n$. So one can easily produce the rational character table and check if your function is a non-negative linear combination of these irreducible characters.
Added: You can now use the orthogonality relations over $\mathbb Q$ to see if something is a character of a rep. One knows the endomorphism algebra of $\mathbb Q[\omega_d]$ as a module over the cyclic group $G$ is $\mathbb Q[\omega_d]$ which has degree $\phi(d)$. So the orthogonality relations (valid over any field of characteristic 0, but in the non-algebraically closed case involves the dimensions of the endomorphism division algebras) can be used to decompose class functions in terms of irreducible characters.
Answer 2 Alternatively, one can build the character table of a finite abelian group $G$ over $\mathbb Q$ in the following way (without reducing to the case of a cyclic group). The Schur index of a degree one character is $1$. So the irreducible characters for $G$ are obtained as follows. Take a complex character $\chi$ and let $\Gamma(\chi)=Gal(\mathbb Q[\chi]:\mathbb Q)$ where $\mathbb Q[\chi]$ is the field generated by the values of $\chi$. Then the sum of the orbit of $\chi$ under $\Gamma$ is a $\mathbb Q$-irreducible character and all such characters are obtained in this fashion. So this describes an orthogonal basis for class functions over $\mathbb Q$ and hence all class functions.
supplement This may be off, but I think a rational-valued class function $f$ is a rational character iff for each complex character $\chi$, one has the inner product $\langle f,\chi\rangle$ is an integer and this integer is constant on the orbit of $\chi$ under $\Gamma(\chi)$.