No and yes.
No: Power bi desktop is an authoring tool. It is not designed for sharing workbooks for consumption (although it can be done of course). But that is why there is no such “prevent editing” controls.
Yes: assuming you are not sharing the source data with others, they can’t edit the queries anyway.