What is the meaning of loyalty? If I work in an organization and am committed
I don't think the dilemma you sketch is really about the meaning of loyalty. You might be loyal to the organization's purpose (as you understand it) or you might be loyal to your current fellow members. The question really is which more deserves your loyalty. There is no general answer, but here are a few reflections that you may find helpful.
One important factor is whether the purpose of the organization has independent importance. Suppose the organization is the Silly Hat Society. It's purpose is for members to come together for fun monthly meetings wearing silly hats. Over the years, the hat part recedes into the background, many show up with uncreative headgear and some even without anything -- but members still enjoy one another's company and are having a good time. In this case, it would be a little silly to place loyalty to the organization's purpose above loyalty to its members: silly to berate members to live up to the purpose of the organization and so on. Here it does not really matter that members gradually abandon the original purpose of the Society or revise this purpose.
By contrast, suppose your organization works against torture and solicits funds from the public for this purpose. In this case, if many of your fellow workers spend a lot of the organization's money on expensive education trips, wasting funds that could be spend on effective anti-torture initiatives, your loyalties clearly should lie with the organization's purpose rather than it's present members.
Even if the organization's purpose is important, you may owe some loyalty to its present members. This is true when there are good-faith disagreements about what the purpose is, precisely, or about what it demands under given conditions. Thus suppose that you work for an organization devoted to the realization of human rights. Most of your colleagues want the organization to launch a major initiative in behalf of a human right that you find unimportant or even questionable. You try to convince them, but fail. The majority decides to go ahead with the initiative. If you believe that your colleagues are genuinely convinced of the merits of the initiative, then -- rather than resign -- you might well defer to their judgment and support the initiative. One reason here might be that you come to have some doubt about your own judgment when you find it unshared, upon reflection, by many others you respect. Another reason might be your appreciation that the organization will be effective only if it concentrates its efforts, that it can concentrate its efforts only if its members collaborate according to a common plan, and that such collaboration according to a common plan will work only with a shared willingness to accept majority decisions.
Perhaps the most important application of the question you pose is to a special class of organizations: states. Most of your fellow citizens probably believe that the purpose of the state is to secure and increase its wealth, power, and territory. Others will think that the justice of the state's internal institutional arrangements is also of great importance. And some will hold that the state's purpose also includes or requires a just foreign policy that deals fairly with weaker states and foreigners and also aims for greater justice in international institutional arrangements. Those who recognize all three purposes will have a quite different understanding of patriotism than those who recognize only the first. In this sort of context, "loyal opposition" makes sense: a sustained effort to convince one's compatriots coupled with a disposition to defer to their judgment at least by respecting the law. But if the gap becomes too large, then one may want to place loyalty to one's country's true purpose (as one understands it upon reflection) above loyalty to its present people -- one may, for example, leave one's country when the fascists come to power or even join a resistance movement aiming to overthrow the fascist regime.