Yes. Fix any measurable set $A$ such that both $A$ and its complement have non-null intersection with each nonempty open interval. Examples are discussed here. Then the characteristic function of $A$ is as desired, since removing a null set does not change this intersection property, which rules out having a continuous extension.
Use the fact that the Lebesgue measure is complete, i.e., every subset of a measurable set of measure zero is measurable and has measure zero (at worse, every measure has a completion). Now, let $I:=[0,1]$ , and let $S \subset [0,1]$ be the set of measure zero.
Then $I= S \cup (S^c)$. We can use the classical definition that $f$ is measurable iff the inverse image of an open set is measurable, while breaking up $I:=[0,1]$ into the union of $S$ ; the measure-zero subset where $f$ is not continuous, and $I\S$ , where $f$ is continuous, and consider the inverse image intersected with each of the two sets (and then consider the union of the inverse images):
Now, let $U$ be open in $\mathbb R$ . Then , $f^{-1}(U)=[f^{-1}(U) \cap(S)] \cup [f^{-1}(U)\cap(S^c)] $. Now, $f$ is continuous in $S^c$, so that $f^{-1}(U)\cap S^c $ is open in $[0,1]$ , and $f^{-1}(U) \cap S $ is a subset of the measurable set $S$ of measure zero, so that $f^{-1}(U) \cap S:=V$ is measurable, ( with measure zero). Then $f^{-1}U)$ is the union of an open set --which is measurable , and a measurable set $V$ ( with measure zero, but we only care that it is measurable), so the inverse image of the open set $U$ of $\mathbb R$ is the union of two measurable sets, and so it follows, it is measurable, so that $f$ is measurable.
Best Answer
You are using that subsets of measure-zero-sets are again measurable for the Lebesgue measure. This isn't trivial, a measure with this property is called complete and the Lebesgue measure indeed has that property.
Now from the viewpoint of logic, it may be good to start with the fact that $f$ is continuous - well, almost everywhere. So Let $E \subset \Bbb R^n$ be the set of points where $f$ is discontinuous.
Now from the definition, a function is Lebesgue-measurable if the preimage of any set in the Borel-algebra of $ \Bbb R$ is Lebesgue-measurable. As the Borel-algebra on $\Bbb R$ is generated by the open sets, it's enough to see that the preimage of any open set is measurable.
Now show that you can partition the preimage of any open set in an open set and a measurable subset of $E$. From the above argument, this shows that $f$ is Lebesgue-measurable.