Intuitively I think this is true and $p$ depends on the convergent speed of $f(x)$. If $f(x)$ converges slowly, then $p$ is relatively larger. However, I don't know how to prove or disprove this proposition. For disproving it, I suspect $\frac{1}{\log x}(x>2)$ to be a counter-example.
Any help or hint would be appreciated!
$\newcommand{\d}{\,\mathrm{d}}$Your suspect counter-example is indeed a counter-example. I assume you had difficulty proving this, so I’ll fill in the details.
Let $f:\Bbb R\to\Bbb R$ be given by $(\ln x)^{-1}\chi_{[1,\infty)}$. I claim that, given any $1\le p<\infty$, we can find $M>2$, $x\ge M$ implying $f(x)^p>1/x$. That would mean - as $|f|=f$ - $f\notin L^p$.
This claim is equivalent to: “$\ln^p(x)<x$ for all large $x$.” If we know $\ln^p(x)\in o(x)$, then that would be sufficient (and stronger). But this isn’t too hard: $$\lim_{x\to\infty}\frac{\ln^p(x)}{x}=\lim_{t\to\infty}\frac{t^p}{e^t}=0$$After substituting $t=e^x$ (valid as $e^x$ is an increasing continuous surjection onto $(0,\infty)$).