To force a site to use the non www you need to create .htacess rule for it. When the user requests page with WWW they will be redirected to non WWW page, you should also be redirecting http to https. There is plenty of examples on how to do this if you google it.
phpBB itself should have no problems with this as the URL's generated are based on the request for the page. If you are redirecting that occurs before the phpBB script is executed thus any page generated should not have any internal WWW links produced.
has some undesired effects on certain EXTs
If an extension is adding the WWW you need to post the problem in the extensions topic.