Given some javascript coding, I reckon you could piggy back on the on("rename", ...)
event, as they talk about in the answer below.
From that callback you should be able to either trigger Templater, or perhaps just do the rename of the folder directly. However, I’m not sure whether that would trigger a loop since you then rename the file again from your callback.
Thread carefully when doing something like this. Very carefully.