Part of the convention General
The rules apply on the high seas and in all waters connected to them that are navigable by seagoing vessels. Local authorities may make special rules for roadsteads, harbours, rivers and lakes, but those must conform as closely as possible to these. Warships, vessels in convoy and fishing fleets may carry additional lights and signals, provided they cannot be mistaken for the prescribed ones.
On a river you are under the local inland rules. Once you are outside in open water the COLREGs apply. If you see an unfamiliar light pattern on a warship, that is a permitted national signal, but by design it must not read as «not under command».