I never could figure out why so many people thought they should be able to use my equipment without having to pay for it. I also never quite understood why, after telling someone how to avoid a problem, it should become my problem when they didn't listen.
There is a painfully simple solution to that problem - treat the training and gear as separate cost centers, and don't make one dependent on the other. Price the course so that it covers the true costs of delivering the training, and stop using gear sales to make up the difference.
Give the students the option of renting gear for the class, and just build the rental fee into the course fee. If they already have their own gear (or purchase it elsewhere) and don't use yours, then it's more money for you. If they like what they are using and buy identical new gear from you, then it's even
more money for you. If they bring in an unsuitable piece of equipment to class, you can tell them why you feel it is not suitable, and offer to swap them out a piece of your rental gear if theirs doesn't work for them. You can do this with a clear conscience and without having to argue over the extra fees, because you have already built that into the course (i.e. more money for you).
You can tell them they are welcome to try whatever rental gear they want, whenever they want, just to see what works best for them. You could even offer to sell them the gear from the course (used) for a substantial discount (but still above your cost) if they like it, which is more money for you. That makes the students feel like they got a good deal on gear that they know they like, and also allows you to turn over your inventory.
Once they finish the confined water work, you could offer to sell them new gear for your standard 10% (or whatever discount), which is more money for you. Alternatively, you could do something like offer a store credit as a "reward" for passing the course - if you restrict the credit so that it can only be used for items where the amount of the credit is less than your markup on the item, then that is more money for you. Your students will no doubt feel much better about these purchases because they have had the opportunity to "try before they buy", and because you have shown yourself to be a customer-oriented store owner who is flexible and accommodating to their needs.
There are many, many creative ways to work a system like, and in such a manner that you do not compromise your principals or violate the terms of your dealer agreements.
It is simply not reasonable to force people to buy their gear from the shop just because they took the course there, and people will often feel "ripped off" if you try and back them into a corner over this issue. Furthermore, the current dynamics of on-line sales are going to make continued hard-line enforcement of such a policy untenable - it is an obvious conflict of interest, and consumers are simply not going to stand for it.
The best way to deal with the "issue" of on-line gear sales is to recognize that they are here, and here to stay, and that the shops are going to have to find new ways to compete with that if they are going to stay in business. Coercing your customers into buying things that they don't need is one way to handle it, but I don't think it's in the long-term best interests of the industry to do that.
Many other retailers are having to find innovative ways to co-exist with on-line sales - why should dive shops be any different?