I have never heard of such a thing. Such access is always made available to all students, and any associated fees would be mandatory. They might be waived on the basis of financial need, but not on an "opt out" basis.
With a policy like you suggest, I'd be worried about students opting out to save a little money, and then discovering they needed access more than they thought, with an adverse impact on their studies.
Also, on a practical level, these systems are usually not designed to be able to grant or deny access to individual students, so they couldn't easily restrict access to those who had paid. Often access is on the basis of IP address range, so that all you need is to sit down at any computer on the campus network, without any further authentication.