In the sense of a soldier wearing non-battle clothing which still marks them out as a soldier and has a rank on it which everyone else can see.
I imagine that a lot of levied armies had no clear uniform at all, and I understand that richer men could afford more/better armour in battle... but what about outside of it? How were officers identified then? If I, as a Roman citizen, met an officer outside of the army, would there be anything to mark him as such?
In the Roman empire, you could spot a soldier by his sword, his belt, and his caligae (military sandals). Civilians could carry swords in certain situations, but Roman soldiers had the right to wear their weapons almost everywhere. Their swords were fastened to dedicated military belts, and these too were distinctive. In the early empire, they had a metal skirt that covered the groin which jingled -- you could hear as well as see soldiers. By the late empire, swords were longer and belted differently, and the military belt changed in style, but both continued to be recognizable marks of military men. You could also tell soldiers by how they walked -- Stefanie Hoss points out that the dangling jingly bits that hang down over the groin tend to slap you in the balls if you don't strut with a good wide stance, and textual descriptions of soldiers say that you could spot them by their saunter. By the late empire, some civilian officials could also wear belts of a similar style -- a development which accompanied the increasing popularity of military styles of clothing among the civilian population.
There were other fashions that were associated with the army but not as exclusively restricted to them, and over time these fashions became increasingly popular along the frontiers and outside the major cities. Cloaks, pinned at the right shoulder, were basic military costume, but could also be worn by civilians. Soldiers adopted trousers from the barbarian peoples they met in northern Europe, and these gradually caught on across the empire. By the fifth century, people in cities -- who still wore the civilian toga for official occasions to mark their educated, sophisticated manners and respect to proper customs -- started to complain about people going about in the habitus barbarus, the clothing of barbarians. By this they meant the rough-and-ready fashions of the Roman military, which were considered barbaric in contrast to the dignified toga. The emperor Honorius even tried to ban this army-inspired costume from Milan (with little luck, it seems, because the fashion didn't go away).
As the western Roman empire's power declined, more and more people started wearing these military inspired costumes. By the fifth century, civilian elites were burying their dead in the full costumes of soldiers, with belts and weapons. By the sixth century, the belts and other references to the Roman empire disappeared from the majority of graves, but the weapons stayed -- there doesn't seem to have been as clear a distinction anymore between military dress and civilian in the west. In the Byzantine east, and in some of the longest lasting cities in the west (such as in southern France), the old Roman habits lasted longer. But in Britain especially, and parts of northern France, every free man (or at least, going from the burial evidence, 50%+ of them) participated in violence as part of the local militia / army / lord's retinue, and the distinction between soldier and civilian ceased to have the same significance.
Medieval soldiers did not have uniforms (for the most part) in battle, so they certainly did not have any outside of combat. An aristocrat could be identified by their coat of arms and they might give their personal retinues some form of badge or livery that matched their arms. Outside of a context where warriors are bearing arms and other military equipment, there would be no way to really tell what "rank" a soldier might hold for military service, besides his general level of wealth.
Medieval people loved their conspicuous consumption; the general principle being "if you got it, flaunt it." A random observer would certainly be able to distinguish, say, someone who held an office at the royal court from some random burgher due to the fine, expensive clothing and accouterments that the royal official would possess. But unless you knew the person specifically, there would be no way to tell whether he was master of the crossbows or in charge of the royal treasury. One of the most famous examples of dress indicating class and status in medieval literature is the Canterbury Tales. Chaucer is extremely obsessive about documenting what characters are wearing and carrying. The Merchant has a hat made out of beaver fur (and nice boots) to indicate his success in business, while the Clerk's clothes are worn and threadbare because he spends all of his money on books rather than on food or clothes (thus proving that grad students have been in a terrible plight since the beginning of the university system).
Going back to a military context, the Knight's Yeoman does not have any lines and we know relatively little about him. Yet the description of his clothes and equipment shows that he's relatively well-off by medieval standards. He has peacock arrows in his belt, his gear is in good condition (contrast to the rusty sword carried by the Reeve, who is no soldier and likely has no real experience with his weapon), and he has the money to buy green-dyed clothes (presumably the green outfit is related to his job as a forester). He also wears a silver badge of St. Christopher, which is the only item he carries without a practical purpose. Even without his weaponry, it would be easy to tell that the Yeoman is someone who has the money to afford arms and train with them. The Miller, although not a warrior, is somewhat comparable to the Yeoman's economic social status. We are told that the Miller is well-armed (with sword and buckler) and competes in wrestling competitions. He has a white coat and a blue hood and, although these are not as fancy as the Monk's luxurious gray furs, they are certainly better garments than the rough gown worn by the Sailor or the Plowman's nondescript tabard. The Miller and the Yeoman are not aristocrats and they have no formal signs of rank or allegiance. But their clothing and equipment very clearly shows who they are and what they do, even to random strangers joining them for a pilgrimage to Canterbury.