Do improper integrals like $\int_{-\infty}^{+\infty} f$ converge if $xf(x)\rightarrow 0$? My teacher assumes without proof in his notes that, given a rational function $R(x)$, the improper integral $\int_{-\infty}^{+\infty} R(x)dx$ converges if $\lim_{|x|\rightarrow\infty} xR(x) = 0$. He then proceeds to explain the Estimation lemma, that is a very similar result.
However it is unclear for me whether this fact is true, and if it is bidirectional (i.e. if $\int_{-\infty}^{+\infty} R(x)dx$ converges then $\lim_{|x|\rightarrow\infty} xR(x) = 0$) and holds true even for non-rational functions

One cannot extend the result to general functions. For example, let $f(x)=\frac{1}{|x|\log(|x|)}$ if $|x|\ge 2$, and let $f(x)=f(2)$ for $-2 \lt x\lt 2$.  
Then $\lim_{x\to\infty} xf(x)=\lim_{x\to -\infty} xf(x)=0$, but the improper integral does not converge.
The result does hold, bidirectionally, for rational functions whose denominator vanishes nowhere. It is essentially obvious, though writing out the proof is typographically unpleasant. For a rational function $R(x)=\frac{P(x)}{Q(x)}$, where $P$ and $Q$ are polynomials with $Q(x)$ nowhere $0$ (and $P$ not identically $0$), there is convergence iff $\deg(Q)\ge 2+\deg(P)$. This is precisely the condition for $\lim_{|x|\to \infty} xR(x)$ to be $0$.  The reason is basically that degrees can only take on integer values.
