So I've changed my mind! I think the answer is "yes". Suppose $X$ and $N$ are given. Let $\epsilon>0$ be given and let $M$ be such that $\mu({x:N(x)>M})<\epsilon$. Now build a Rokhlin tower with height $M/\epsilon$ and error set of size at most $\epsilon/M$. Let $A$ denote the base of the tower (so that $\mu(A)<\epsilon/M$). For each $x\in A$, let $n_1(x)$ be the least integer (up to $M/\epsilon-M$) such that $N(T^{n_1(x)}x)\le M$ (or $n_1(x)=\infty$ if there is no such finite integer). Then let $n_2(x)$ be the least integer greater than $n_1(x)+N(T^{n_1(x)}x)$ (up to $M/\epsilon-M$) such that $N(T^{n_2(x)})\le M$ etc. For each $x\in A$, let there be $k(x)\ge 0$ finite values of $n_j(x)$.
Let $B_x=\{T^{n_j(x)}x:j\le k(x)\}$ and let $B=\bigcup_{x\in A} B_x$. This is a measurable set. I claim it has the properties that you want.
Let $F=\{x\colon N(x)>M\}\cup E\cup \bigcup_{j=1}^{M-1}T^{-j}(E\cup A)$. This set has measure at most $4\epsilon$. Now for $x\in B$, notice that $$ R_B(x)-N(x)\le \sum_{j=0}^{R_B(x)-1}\mathbf 1_F(T^jx). $$ In particular, it follows that $$ \int_B (R_B-N)\,d\mu\le \mu(F)<4\epsilon, $$ as required.
COMMENT: It was pointed out to me by Jairo Bochi, the poser of the question, that it is not necessary to use Rokhlin's lemma in the proof: it suffices to take $A$ to be any set such that $\mu(A\cap T^{-j}A)=0$ for all $1\le j<M/\epsilon$. In an ergodic system, one can find such a set by taking $A_0$ to be any set of measure less than $\epsilon/M$ and defining $A=A_0\setminus\bigcup_{j=1}^{M/\epsilon}T^{-j}A_0$ (this set is not of measure 0, as otherwise every point of $A_0$ would return to $A_0$ within $M/\epsilon$ steps, so that the measure of $A_0$ would exceed $\epsilon/M$ by ergodicity.)