It is addressed in the timeshare laws. They can not prevent you from you selling it via a third party.
I suspect this might depend on what they are selling.
Right now, they sell "deeded interests" which themselves are a little odd, because they are not in perpetuity. (Whether Deeded or non-deeded was preferable was fairly controversial in the timeshare world before
DVC was created; the former meant you owned in perpetuity, the latter meant you didn't. DVC muddied the waters significantly here).
But, setting that aside, the "deeded" nature seems to suggest that selling to an arbitrary third party is legally protected, because you own "real" property. There's also the question of what exactly you are selling: for Riviera, the thing you are selling will grant the buyer access only to Riviera, even though what you own (assuming it was purchased from Disney) grants you access to more.
However, deeded isn't the only way to go. Club Wyndham Access does not sell deeds; they sell memberships in a trust. As it happens, these interests can be resold and they carry the same reservation rights for the buyer as they did for the seller. There are some other features that
are different from deeded timeshares: the developer retains the voting rights at the underlying resorts in the trust, and recovering an ownership from an owner not paying their annual fees is much easier than it is for deeded real estate--the latter requires a foreclosure.
But, I am not 100% sure that the trust-membership model can't be structured in a way that can't be meaningfully resold. I dimly recall a couple of "vacation clubs" that are set up this way but I can't off the top of my head supply the details.