Some historical examples:
In the 19th century every state and territory in the United States could have two different armies. The state or territorial militia of part time soldiers, the ancestor of the modern National Guard, and in emergencies state or territorial volunteer units. During the Civil War the federal government had two different armies, the United States Army, the regular army, and the United States Volunteers, which were state and territorial volunteer units mustered into federal service.
George Cadwallader (1816-1879) was a Philadelphia aristocrat who rose to the rank of brigadier general and then major general in the Pennsylvania militia. During the Mexican War he was appointed a brigadier general in the Regular Army but resigned when the war was over. In the Civil War he was appointed major general of Pennsylvania volunteers in 1861 and major general of United States Volunteers in 1862. Thus George Cadwallader became a general in four different types of armies in the United States.
And those were all what are called substantive ranks. In the 19th century there were also brevet ranks which were more or less honorary, to oversimplify. A number of Civil War era generals were commissioned 8 times; as both brigadier general and major general, in both substantive and brevet ranks, and in both the United States Volunteers and the United States Army.
Obviously a major combat unit like a field army might contain units of the United States Volunteers, the United States Army, and militia units. Therefore the rule was that among officers of the same rank, regular officers had seniority over volunteer officers who had seniority over militia officers.
The Civil War involved considerable combat on inland waters and thus considerable cooperation between army and navy officers. An ancestor of mine was an infantry enlisted man who served for a time on a gunboat in the James River. And no doubt there were rules for the command rights of army and navy officers.
John Brown's raid on Harper's Ferry in 1859 was fought by a company of Virginia militia. On October 17 President Buchanan sent a company of Marines under 1st Lt. Israel Greene to Harper's ferry. Buchanan sent Lt. Col. Robert E. Lee of the 2nd US cavalry to command the operation to defeat and capture Brown's men.
So that is an example of a regular army officer commanding Marines and state militia in a military operation.
At the First Battle of Bull Run July 21, 1861, a Marine Corps Battalion of 4 companies under Major John G. Reynolds was part of the First Brigade under Colonel Andrew Porter which was part of the Second Division under Colonel David Hunter which was part of the army under Brigadier General Irwin McDowell. So Marine Corps officers and men were fighting alongside and under army officers and men.
In 1899-1900 French expeditions were sent to the Lake Chad area to fight the warlord Rabah Zubeir. The Foureau-Lamy Mission was sent south from Algeria, the infamous Violet-Chanoine Mission was sent east from Senegal, and the Bretonnet Mission, followed by the Gentil Mission, north from the Congo. Rabah wiped out Bretonnet's force in the Battle of Togbao 17 July 1899. The Violet-Chanoine Mission, now the Joalland-Meyneir mission, united with the Foureau-Lamy Mission in 1900. They linked up with the Gentile Mission on 21 April 1900 and Major Lamy took command of the joint forces. At the Battle of Kousseri 22 April 1900 they defeated and killed Rabah and recovered the three cannons captured from Brettonet. Lamy was killed at Kousseri and Emile Gentil became the commander of the French forces.
Both Lieutenant Henri Bretonnet and Captain Emile Gentil were naval officers, commanding and fighting alongside army officers. Abd ar-Rahman Gaourang II (c. 1858-1918), the Sultan or Mbang of Bagirmi, fought as a French ally at Togbao, where he was wounded before escaping, and at Kousseri. Thus the war against Rabah involved an allied leader as well as French officers from different services.
During British wars of the 19th century, mostly colonial wars, naval brigades of sailors and marines were often sent ashore to fight alongside army units. Wikipedia lists 16 wars in which that happened.
And of course, when both sailors and soldiers were in a force, either an army officer or a naval/marine officer would be in command of the entire force, and thus command officers and men of another service.
In the Second Seminole War of 1835-1842, there was naval and Marine participation.
Late in 1836, Major General Thomas Jesup, US Quartermaster, was placed in command of the war. Jesup brought a new approach to the war. He concentrated on wearing the Seminoles down rather than sending out large groups who were more easily ambushed. He needed a large military presence in the state to control it, and he eventually brought a force of more than 9,000 men into the state under his command. About half of the force were volunteers and militia. It also included a brigade of marines, and Navy and Revenue-Marine personnel patrolling the coast and inland rivers and streams.
The Navy sent its sailors and marines up rivers and streams, and into the Everglades. In late 1839 Navy Lt. John T. McLaughlin was given command of a joint Army-Navy amphibious force to operate in Florida. McLaughlin established his base at Tea Table Key in the upper Florida Keys. Traveling from December 1840 to the middle of January 1841, McLaughlin's force crossed the Everglades from east to west in dugout canoes, the first group of whites to complete a crossing. The Seminoles kept out of their way.
At the Battle of Seattle, 26 January 1856, Marines from USS Decatur landed to assist the townspeople, and the ship shelled the hostile positions. And as far as I know none of the settlers complained about the naval assistance on the grounds that only the US army was supposed to fight Indians.
As for your admiral commanding a small force coming to the aid of an endangered outpost, admirals usually command fleets. Fleets that can bombard shore positions with cannons and missiles.
Perhaps your admiral is a former navy aviator instructing naval aviators and leads a squadron of naval planes to assist the outpost. Or maybe the admiral is a former special forces operative and is training a unit of special forces and is the most experienced officer available to lead them.