Well, it might be nice to have such options per file and folder. Then again, different OS’es handle these attributes differently (think of Linux’ file system access permissions and Windows’ ACLs), and they might get lost when syncing.
If needed, I typically use the OS’ features to set folders/files read only, and Obsidian respects that (with a console error, and no user-readable error message but nevertheless).
Here, on Linux, I’ve set my Scripts folder to read-only (555), and now of course cannot create a new file in it:
app.js:1 Uncaught (in promise) Error: EACCES: permission denied, open '/home/matthias/Dokumente/Obsidian/Knowledgebase/Scripts/Untitled.md'
(Obsidian’s UI silently fails to create a new note.)
Since Operating Systems have a wide and sometimes rather complex range of possible file/folder permission settings, I wouldn’t expect Obsidian to be able to handle them all, so I use (and recommend) using the OS’ features.