Yes, but that's a separate issue, with its own (partial) solution.
Drive Trust Rules lets you restrict who they can share with.
However, AFAIK, there's no way to restrict commenting in a Docs file, making it semi-pointless.
But, there are alternatives!
Text - decent local editor
Text Editor - more advanced local tex editor, at least I think it's local.
--
https://wheretofind.me/@NoSubstitute