I’ve used Discourse for courses in the past, and I know a guy who is running a cohort course on it. It can be a little fussy (i.e. video content needs to be hosted elsewhere, not always easy to navigate linearly) but once you work around those limitations, it can work quite well.
Akimbo’s cohort courses have all run on Discourse, too, and they are incredibly well done. The best course experience I’ve had ever.
With Akimbo’s courses, they had categories for each module and would make them public on days throughout the course. Keep in mind this was a time-based cohort course vs. self-paced. It worked quite well.
Others used a sole category for the course and restricted posting to the category. Each topic in the category was a module of the course. For navigation, they used a topic for a table of contents combined with links in each module to the TOC, last module, and next module. It seemed to work well.
I haven’t seen any do this on Discourse, no. The trick is permissions live at the category level, meaning you’d need two categories to segment free and paid course content.
I would bet this is possible with custom Data Explorer reports and some manual adding of users to groups or possibly even with the Discourse Automation plugin.