At a basic level, a flag and its flagpole is a staff with a cloth bound to one end of it. The user will attack by bludgeoning the opponent with the pole or wave the flag in their face as a distraction for somebody else.
But if the plan is to use it as a weapon, we can do a lot better. For a start, we turn the flagpole into a spear. A spear already works by holding one end and thrusting so the the pointy end goes in the bad guy. Something that has not been stated as of now is that the flag itself can be wrapped around the pole when not being employed as a flag.
A lightweight but sturdy metal pole with a flag of hydrophobic fabric (for repelling blood), using modern technologies to make the whole ensemble more durable all around and more lethal in parts is certainly achievable. Possibly using modern or futuristic tech to enable quick actions with the flag itself without having to worry about a large amount of specialized training to use it as a weapon fully.
Raising the Flag
The first use is as a flag. As stated, it provides information as to who you are and represent. It is more to prevent friendly fire than to identify yourself to the enemy. Thus, its first use in combat is as a rallying point for your side ... and a target for the other side.
Second use is as a spear. With a spear tip attached to the pole end, it becomes a passable spear that can stab your enemies or clobber them with the pole itself if necessary. In this mode, the flag is either used as a flappy-flappy distraction for others, or wound around the pole so as to not be horribly distracting to yourself
Third is to ditch the flag itself and use it as a staff. Unless your flagpole has some manner of quick release mechanism for the flag itself, my thoughts would be that this is really only employable if the flag is rolled up, or more likely broken off the pole by an opponent. Be wary of the spear point that may still be on the pole though.
Depending on the futuristic parts of your tech, you could install a forcefield generator within the pole and have it makes a protective shield when planted in the ground and activated. Turn it into a rallying point for your troops when the giant lasers are fired, using the flag as a giant heat sink for the generator in the flagpole or something equally technobabble.
Alternatively in the Future Tech department, hiding any sort of weapon in the flagpole is an option so long as it is still usable. It might be slightly impractical, but it is something to consider.
Incorporating it into your society is something to think about. If the position of Flagbearer is one of honour, then maybe they are a chosen troupe that are taught a martial art dedicated to using the flagpole as a weapon. Potentially they are an honour guard for important people, designed to be unobtrusive until it is time to act.
Perhaps you are a nation that likes their flags. If every house has one, then maybe learning how to use a spear/staff becomes the basis of the militia training when guns are no longer usable, either due to range, availability, or other factors. This would be in a similar way of peasants of old weaponizing anything when called to arms. In a modern sense, then answer is almost certainly more guns/blasters/lasers, but a flagpole is innocuous until used to clobber the enemy. Modern technology might incorporate quick-release mechanisms to planted flagpoles, allowing them to be pulled out swiftly to save time.
In Fate/Apocrypha, the Ruler class servant summoned to oversee the Grail War fights with a flagpole complete with flag for almost the entire time. When she uses it as a weapon, it is typically employed by rolling the banner up around the pole and bludgeoning things with it. While not everything might translate to a regular person's ability, it might form the start of something.
There is also the planting it to make a magical barrier against attacks Noble Phantasm, in which case the banner flies in the obviously dramatic magical winds.
Granted, she does not carry it around with her all the time, but it is treated as her primary weapon for the series.