Question: Is there a function $f:[0,1]\rightarrow R$ such that for all $B\subset [0,1]$ with the Lebesgue measure $\mu(B)>0$, $f$ is unbounded on $B$?

Answer: 
Yes. Let $A$ be a Vitali set, that is, a set of representatives of $\mathbb R/\mathbb Q$, and let $m:\mathbb Q\to\mathbb N$ be an enumeration of the rationals. Define $f(\alpha+q)=m(q)$ for all $\alpha\in A, q\in\mathbb Q$ (restrict to $\alpha+q\in[0,1]$ if you want a function defined on $[0,1]$). There is no set $B$ with $\mu(B)>0$ on which $f$ is bounded, because each such set would be a subset of $\bigcup\_{n=1}^N f^{-1}(n)$ for some $N$, and all measurable subsets of a non-measurable set $f^{-1}(n)$ necessarily has measure $0$ (see [The subset of non-measurable set](https://math.stackexchange.com/questions/88449/the-subset-of-non-measurable-set) ).
For such a function, the sets $A\_n=f^{-1}([-n,n])$ would be zero sets, $\mu(A\_n)=0$.
Then $$\mu([0,1])=\mu\left(\bigcup\_nA\_n\right)\le\sum\_n\mu(A\_n)=0.$$