what IS that separate thread? generally speaking, changes to the project can only be made from the UI thread (i.e. the main AE thread), so it's unclear to me what other thread you might be speaking of.
all of AE's API is *not* thread safe, except for a few calls that are intended to be called during render time such as the itertion suite. the one exception to the rule is AEGP_CauseIdleRoutinesToBeCalled() (which is safe to call from any thread at any time, but not aquire).
if i understand the situation correctly, i would suggest implementing an idle hook, that AE calls routinely a few times every second (up to 50 times per second sometimes). during that call you can check the websocket for messages, and affect your effect. you can change some invisible param using AEGP_SetStreamValue(), which would force a re-render.