Your assumption/premise is wrong. You can use set -e in a script where a program might return an error as long as you catch the error and preferably deal with it (although a no-op like : works just as well as real code for the purpose of preventing early termination).
For example, consider these two trivial examples, which both use false to trigger a non-zero exit code (i.e. an error):
uncaught.sh:
#!/bin/bash
set -e
false
echo "the script will never reach this point"
caught.sh:
#!/bin/bash
set -e
if false ; then
: do something about the error here
fi
echo "still running, this line will execute"
The first script will not produce any output. The second will.
As long as you catch the error, e.g. with an if statement, or by using && or ||, the script will not terminate even if the script uses set -e.
Here's another trivial example, caught2.sh, this time using false twice:
#!/bin/bash
set -e
false || echo error
false && echo no error
echo "still running, this line will execute"
Like the second script, this one will have printed output, a line containing only "error" and the "still running..." line, because the "errors" were caught.
If you don't want to or don't know how to deal with the error correctly, or if it doesn't matter whether a command succeeds or not, it's not uncommon to just use true to discard the exit code. e.g.
udisksctl mount --block-device /dev/sda1 || true
The script will continue on to the next statement whether the mount succeeded or failed. For a mount fs operation in particular, this is bad practice (you really should capture the exit code and take appropriate actions depending on the nature of the error¹ - e.g. permissions problem, fs already mounted, device is missing or what was known as sda1 is now called sdb1 after the last reboot, cosmic horror flipped my bits, or whatever), but it "works".
¹ Unfortunately, the udisksctl man page doesn't document the exit codes. You'll have to examine the source or search for other documentation.
BTW, you should check the exit code when you unmount the fs too, there are many reasons why an unmount might fail even though you were able to successfully mount the fs. Including most of those that might prevent a successful mount plus a few others like: a file being open on that fs, or a process having its CWD inside the mounted fs.