I think you might be missing the point? If you create a plugin on GitHub and place it in a Private Repo, you have full control over modifying Discourse (albeit with plugin approach) and have full ownership and control over those changes. No-one else will see them and you don’t need to fear any legal implications afaia. All whilst being able to take advantage of supported core changes.
A plugin gives you the ability to change the front and back-end.
Forking and modifying Discourse is going to get real messy, real fast, regardless of the legal situation, so is not advised.