Let $a,b\in\mathbb R$ with $a<b$ and $f:[a,b]\to\mathbb R$. Assume that there exists a Riemann integrable function $g:[a,b]\to\mathbb R$ such that $f=g$ almost everywhere.
Then we can NOT conclude that $f$ is Riemann integrable. Indeed, $f$ can be unbounded: taking $a=0, b=1$, $g\equiv0$ and $$f(x)=\begin{cases}\frac1x,& x\in(0,1]\cap\mathbb Q,\\ 0, & \text{otherwise.}\end{cases}\tag{$*$}\label{star}$$
However, if we also know that $f$ is a derivative, i.e., if there exists a differentiable function $F:[a, b]\to\mathbb R$ such that $f=F'$, then can we conclude that $f$ is Riemann integrable?
According to On the Riemannian integrability of the bounded derivative (now we don't assume the boundedness of $f$), it suffices to show that $f:[a,b]\to\mathbb R$ is bounded under the stronger condition that $f$ is a derivative.
Note that the function $f$ given by \eqref{star} is not a derivative, since it does NOT have the intermediate value property (see Darboux's theorem).