In short, yes EM4 would permit the dual ladders to deploy a flag, or even one flag hanging off of a single ladder truck (the single is much easier to do). The key factor for the dual ladder trucks is having the two vehicles take up position in relation to one another so they are facing one another with just enough space between them so that when they deploy the ladders the appropriate spacing is available between them. Once they are deployed both ladders would be removed temporarily and replaced with a single prototype which includes both ladders as a body without a ladder on it, and a child on one of them which has both ladder booms raised and deployed with a flag hung between them. To remove them the command would swap back to the normal prototype and function just as normal in removing the real ladders.
To do a singular ladder all that it must do is have a ladder deploy to the raised position, then proto swap to a ladder with the booms extended to to the default position when raised with a flag attached to the end of the ladder arm.. To undeploy it would just require a proto swap back to the normal ladder that doesnt have the flag on the end.