Except for some exceptions to the rule, using an account that owns a license for the game fixes these errors (but as mentioned, there are some exceptions that still don't work outside of the normal Steam way [using the UI])If developer allows anonymous downloads you should be able to use steamcmd to download them. Dev of Rimworld probably allows it. Dev of another game(in the picture below) doesn't allow it, that's why steamcmd is giving an error(you can see in the picture).
View attachment 4203124