Attached is a patch to solve the problem.
WARNING My patch contains the cas-minus-ldap patch (#16168), since it's much more logical to use both, but can also be useful without the previous one.
With the standard CAS module, any CAS-authenticated user is allowed to connect to Moodle : if she doesn't have any account, Moodle asks for auto-subscription.
This patch allows the admin to choose if the user needs a local account (new behaviour) or can auto-subscribe.
It adds one CAS plugin parameter : cas_autosubscribe (bool).