Number 1 reason is that there is a swapfile active. That would need to be removed in any case, or moved to a dedicated block device. But just mounting the rootfs R/O will break a lot of things, using an overlayfs is the practical solution, indeed.
These instructions are old, but should still work well: Samba Fails on RO filesystem - #2 by Joulinar