The ruling “has a basis in fact” insofar as the DMG account of how objects are effected by different damage types is extremely permissive (DMG p. 246):
Objects and Damage Types: Objects are immune to poison and psychic damage. You might decide that some damage types are more effective against a particular object or substance than others. For example, bludgeoning damage works well for smashing things but not for cutting through rope or leather. Paper or cloth objects might be vulnerable to fire and lightning damage. A pick can chip away stone but can’t effectively cut down a tree. As always, use your best judgment.
Note that this doesn’t even establish, for example, a hard and fast rule for a common sense ruling like paper being vulnerable to fire damage. So it is certainly not that case that the rules clearly state that adamantine objects can’t be immune to fire damage.
Of course, these rules specifically apply to inanimate objects. You say:
In this instance, it was an animated sword that was attacking us, and therefore a creature, no longer just an object.
I feel that this undercuts your concern over an object’s damage resistances/vulnerabilities/immunities. After all, if it is a creature, the DM can modify a creature’s stat block in any way they would like. The DM is not restricted to creatures in the Monster Manual. Your argument seems to turn on the DM using the object material to make the case that the adamantine sword was immune to fire damage. But note that the statistics for the flying sword (and you don’t specifically say that the “animated sword” is a Monster Manual flying sword) cannot be derived from the object properties. According to the DMG, steel has a suggested AC of 19, the flying sword has a DEX modifier of +2, so arguably it should have an AC of 21. Instead, it only has an AC of 17. For reference, adamantine has a suggested AC of 23. Did the sword you were fighting have an AC of 23, or 25 with DEX bonus?
So, either it’s a creature, in which case the DM has wide leeway (the DM is not restricted to creatures in published works, and even constructs in published works diverge from characteristics of the materials they are made of), or it’s an object, in which case the DM has wide leeway (because most of the rules around objects are suggestions, including AC, hit points, and damage resistances/vulnerabilities/immunities).
For what it’s worth, I probably wouldn’t make adamantine immune to fire damage. If it was forged in fire, fire can unmake it (except for artifacts). Maybe resistant? But I also wouldn’t spend a lot of time thinking about precise damage types for objects, unless it was really critical to the narrative.