There should exist such a function, but I cannot think of any example. Onto continuous functions mapping $(0,1)$ to $\mathbb R$ are easy to find.
Edit: Sorry - I mentioned Tietze extension theorem proved the existence of such a function - that was wrong. I mixed it up with a different question.