Is there any way to display an advertisement every X amount of posts inside of a discussion?
try the pockets plugin
X Repeat Every
or use the search box in the add-ons section and type the word "ads". there may be something else, may require you to test a few plugins.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
thank you as always good sir