I agree – I love Discourse and I’ve either worked or participated heavily in 4 incarnations of it now, so I know it reasonably well.
The answer to your basic question is yes in theory, but in reality only to a degree.
It’s open source, so technically you can do whatever you like to it, but unless you are a RoR dev with unlimited time and patience, I wouldn’t recommend making big changes to core.
Plugins are the way to go, and even they will need tweaking every now and then. It’s been around long enough now that quite a few people are on top of writing good plugins, and there is a reasonably active marketplace for them.
There is an officially endorsed ad plugin available here but I haven’t had personal experience with it. And depending on your hosting arrangement, you may be limited in the plugins that you can install (official Discourse hosting allows very limited plugins unless you’re on an Enterprise plan. discoursehosting.com are more flexible but their support isn’t as quick.)
If you have more questions, shoot.
@erlend_sh may also have something to add.