To be sure, while one of the ships mentioned in "Legacy" was considered by Picard to have been "his ship", the other was stated to have been "her ship", meaning Tasha Yar's. Does that mean Yar was the captain of that other vessel?
In practice, the dialogue only establishes that Picard was aboard one ship while Yar was aboard the other. No particular reason to say Picard was aboard in a commanding role. Given his later utilizability as an interstellar James Bond, we might say that he was one of Nechayev's secret agents at the time, riding aboard various vessels in cape and dagger work (not cloak and dagger, because Feds don't use cloaks).
OTOH, Picard in TNG is considered an accomplished diplomat, with connections all across Starfleet as well. Fat chance that two decades of service aboard an outdated starship far away from the Federation would give him those connections. He might have been a roaming diplomat during the "Legacy" backstory, then, not in command of "his ship" but a honored guest.
But of course, everything is possible. It just doesn't seem writer intention that "Legacy" would have referred to another Picard starship command.
For a fun take of the mysterious 9 years, read the recent The Buried Age. I intend, too, eventually...
Timo Saloniemi