This is possible but will depend on the version of 'sudo' the target OS has onboard.
If the "-S" option is supported then you can do
echo <the_user_passwd> | sudo -S <the protected command line>
The -S option instructs sudo to suppress password prompt and read the required password from stdin
see - https://www.man7.org/linux/man-pages/man8/sudo.8.html
Obviously your workflow would need to have the right password available and using echo like this might mean the raw password is retrievable from the process data for your invocation.
It definitely works but may have some caveats to consider
-HTH