Yes. Abraham ibn Ezra writes in his “secret of the twelve” that Moses did not compose the last twelve verses of the Torah. Joshua did so via prophecy. Thus Moses did not write the entire Torah.
Spinoza agreed, but took it too far, writing that ibn Ezra was referring to twelve stone tablets. He wrote, “From what has been said, it is clearer than the sun at noonday that the Pentateuch was not written by Moses, but by someone who lived long after him.”
The Jewish scholar on medieval Torah scholars, Warren Zev Harvey wrote that Spinoza misunderstood ibn Ezra.
 See his “secret of the twelve” in his commentary to Deuteronomy 1:2. Also see The Babylonian Talmud, Bava Batra 15a, Menachot 30a, and Midrash Sifrei, "Moses wrote with tears."
Joshua did not violate the Torah.
 See Tractatus Theologico-Publicus