Ulysses comes with built-in password protection on macOS and iOS. On both platforms, your content is protected from being viewed by others in the app.
You can enable password protection on Mac in “Preferences” › “Privacy”. Toggle “Password Lock Enabled” and enter a password. Not you have several options to choose from:
Also, please note that password protection does not provide actual encryption of your data on disk – they are stored unencrypted. Your iCloud data are only transmitted and stored on iCloud servers with encryption (see iCloud security and privacy overview).