If a starship was assign to another department of the Federation? It would still be a Federation starship. But a starship that is assign to their home plant or sold to another planet or organization with in the Federation, with is not run and control by the Federation, are not Federation vessels. A starship in service of the UESPA would not be a Federation starship. But if a UESPA starship is sent to a world that is a habitable world that isn't a Federation member world? That starship would be a Federation starship.