Incomplete Answer
Answering this question is not as trivial as it seems on the first glance, and even though I did not answer the question completely, I will leave the post for other readers in case they find it useful.
In the context of Calculus, I presume that integration refers to Riemann integration:
If you refer to Riemann integrals, there is the Lebesgue-Vitali theorem: A bounded function on a compact interval $[a, b]$ is Riemann integrable if and only if it is continuous almost everywhere (i.e. the set of its points of discontinuity has Lebesgue measure zero, which includes the possibility of finitely many discontinuities).
We call $F$ an antiderivative of $f$ iff $F' = f$. Under the right conditions (e.g. $f$ is continuous), $F=\int f(x)\,\mathrm{d} x$.
- If the identity $F' = f$ is assumed to hold almost everywhere (i.e. up to set of measure zero), then we would be done: We could use the Riemann integral as the antiderivative, and the Lebesgue-Vitali theorem would give you necessary and sufficient conditions on $f$ for $F$ to exist. Note that the Riemann integral is differentiable almost everywhere.
- However, if $F' =f $ is meant to hold everywhere (which is likely the intention in the context of Calculus), things get more complicated. The issue is around discontinuities of $f$: It is tempting to assume that discontinuities of $f$ would be the issue, and antiderivatives exist if and only if $f$ is continuous. However, this is not entirely the case:
- If $f$ were continuous (on a compact interval), the antiderivative would always exist. Therefore, $f$ being continuous is a sufficient condition for $F$ to exist.
- There are discontinuities (e.g. removable discontinuities, jump discontinuities) that would clearly cause $F'\neq f$, and they should not appear.
- However, there are examples of discontinuous $f$ which do have an antiderivative $F$, and they seem to be essential discontinuities.
Conclusion: $f$ should not have jump or removable discontintinuities, however $f$ might be allowed to have essential discontinuities.
See https://en.wikipedia.org/wiki/Antiderivative#Of_non-continuous_functions for some further comments.