This depends on your employment agreement, if any, with the organization, and on the company's contract with the organization.
You can quit your job with the organization, giving whatever notice your contract provides.
The company can end its contract on whatever terms that contract permits. Most service contracts specify a fixed term, with renewal possible or in some cases automatic if notice to end the contract is not given by some specified date before the renewal date. But many other arrangements are possible. If no term is specified in the contract, and there is no provision for how much notice is required, then the company should give "reasonable" notice, which will probably be in line with the norms and customs of the industry involved in the relevant country. The specific law of that country may or may not provide a required minimum notice period.
The contract between the company and the organization might provide that they would not hire any employees or recent ex-employees of the organization without consent for some period, perhaps a year. If there is such a provision it must be complied with unless it is not enforceable under the law of the jurisdiction. Different jurisdictions have very different attitudes toward such contract provisions. If such a provision were violated, and it was enforceable in the jurisdiction, the company would be liable for damages if the organization choose to enforce its contract.
The contract between you and the organization might include a provision that you not leave to become employed (within some time limit) by one of the organization's customers, or perhaps by one you had worked with. If there is such a provision, it might or might not be enforceable in your jurisdiction. If it is enforceable, you must comply or be liable for damages.
Even if there are no contract provisions preventing such employment of you by the company, you must not without permission take with you and use for the company's benefit any confidential information that is the property of the organization and is not already known to the company through legitimate means. If you do, both you and the company might be liable for damages under trade secret law.
In the absence of any enforceable contractual provisions, and if no confidential information is taken by you, there should be no legal problems. The moral issues I am in no position to offer an opinion on, and are off-topic here anyway.
If you were to quit, and the company were to then seek to break its contract because, in your absence the organization could not provide proper service, and you were then to accept employment with they company, and if further the company had known of your plans, both you and the company might be liable for damages to the organization, depending non the details of the law in your jurisdiction. This could be a tort of "interference with a contractual relation" or something of the sort. You should be very careful in agreeing to any such procedure.
If there is a question as to whether a provision of a contract between the organization and either you or the company in enforceable, or whether a provision prohibits you leaving the organization to be employed by the company, that would need to be addressed by a lawyer who knows this area of the law in your jurisdiction, and the specifics of the contract, or eventually by a court. It is out of scope for this forum.
Nothing in this situation will be a problem if the organization agrees to whatever is done. All possible problems occur only if it does not agree, and claims to have a legal right to prevent it or seek damages.