Sort of, yes, but it's quite a bit more nuanced than that.
The actual rules say you're not allowed to obscure the meaning of a message. Use of encryption itself is not specifically prohibited, but you're not allowed to hide the information being sent. So, "encryption" is technically allowed for things like authentication and signatures, under most interpretations of the rule.
It is correct that you're not allowed to use your ham license for any commercial purpose. But again, there are narrow exceptions: a teacher getting paid to teach a class on amateur radio or science in general can transmit to demonstrate the technology, or an astronaut or military member making contacts with amateurs for goodwill purposes or as part of an exercise.