The non-object error indicates that the object is not available there. Looking at the code, I think I can see why. In OnParseDocument, the only available variables are $content and $documentOutput (deprecated and probably gone soon).
So for OnParseDocument, there may be no way to get the $resource itself (so no TV values) unless $modx->resource is set. It should be, but I'm not sure -- your experience suggests otherwise, but any typo in a plugin will cause all kinds of hard-to-debug chaos.
In OnWebPagePrerender, no variables are set in the invokeEvent() call, but $modx->resource is definitely available (as you're seeing).
------------------------------------------------------------------------------------------
PLEASE, PLEASE specify the version of MODX you are using.
MODX info for everyone:
http://bobsguides.com/modx.html