resources linked as "/style.css"
/style.css (with a slash prefix) is a root-relative URL-path. If you were consistently using root-relative URLs like this, with "files" in the document root, then the problem would be easier to resolve. However, you later state you are using "relative paths" which results in "thread/style.css", which means you are referencing style.css only (no slash prefix). This is harder to resolve and causes additional problems.
Ideally, you should be using root-relative (or even absolute) URLs throughout (for static assets and internal links). eg. /forum/style.css. If the root directory is variable, then build this into your application and construct the URLs dynamically.
RewriteRule ^thread/([0-9]+)/?([0-9]+)?$ thread.php?t=$1&p=$2 [NC,QSA]
This rule suggests you could request /forum/thread/12345 or /forum/thread/12345/67890 (or even /forum/thread/12345/ - potentially a duplicate content issue as this would presumably serve the same content as the URL without the trailing slash). If you are using just relative URLs like style.css only then this will resolve to /forum/thread/style.css and /forum/thread/12345/style.css respectively. And obviously 12345 is variable, so we have many potential variations we need to "correct" with rules in .htaccess. If you have other URLs at differing path-depths then more rules could be required in .htaccess to correct these as well. This can get messy very quickly... difficult to maintain and more prone to error. Not to mention issues with canonicalisation and caching, since you potentially have an infinite number of URLs that all serve the same cacheable resource. (To resolve these issues, it would need to be an external redirect - but that would cause other problems for users and your server... performance and load.)
So, this comes back to using root-relative URLs as mentioned above. ie. /forum/style.css in your example.
Aside: Unless the above rule is the only rule in your .htaccess file then you should include the L (or END) flag to prevent other directives that follow being processed. The use of the NC flag also creates potential duplicate content issues since /thread/12345 and /THREAD/12345 (two different URLs) will return the same content. (Presumably you are using the canonical meta tag in the page to help resolve this?)
As an academic exercise only:
If you are consistently using a root-relative URL of the form /style.css (starting with a slash and no other path information) and this needs to be rewritten to /forum/style.css then you could implement a rule in the root .htaccess file as follows. (I note from your rule above that you are using a .htaccess file located in the /forum/ subdirectory, not the root.)
For example:
# /.htaccess - ROOT .htaccess file
RewriteEngine On
# Rewrite "/file.ext" to "/forum/file.ext" if "/file.ext" does not exist,
# ...but "/forum/file.ext" does exist
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{DOCUMENT_ROOT}/forum/$0 -f
RewriteRule ^[\w-]+\.\w{2,4}$ forum/$0 [L]
Note, it is necessary to hardcode the /forum/ directory in the above rule.
However, if you are using relative URLs of the form style.css then to "correct" just the examples stated above you could do something like the following in the /forum/.htaccess file, before your existing rewrites (the order could be important).
# /<dir>/.haccess (ie. "/forum/.htaccess")
RewriteEngine On
# Calculate the value of "<dir>" - the parent directory - when requesting what looks-like a file
# This is stored in the environment variable "DIR"
RewriteCond %{REQUEST_URI} ^/([^/]+)
RewriteRule .\w{2,4}$ - [E=DIR:%1]
# Rewrite "/<dir>/thread/file.ext" (or "/<dir>/thread/<number>/file.ext") to "/forum/file.ext"
RewriteCond %{DOCUMENT_ROOT}/%{ENV:DIR}/$1 -f
RewriteRule ^thread/(?:\d+/)?([\w-]+\.\w{2,4})$ $1 [L]
The above could be simplified if you blindly rewrite requests to /forum/ without first testing for the file, but you will end up with a lot of unnecessary rewrites and a poluted access log.
This also does not resolve the canonicalisation/caching issues mentioned above.
(This also assumes you don't have a physical directory called /forum/thread/.)