We can't tell, since we haven't seen the relevant contracts. Ordinarily a secondment agreement would be between companies X and Y, and you are not a party to the contract, therefore your agreement is irrelevant. But we don't know if you are, legally speaking, a party to the contract. Check the secondment agreement that you signed to see what it says, and if you didn't, then that's one reason why your agreement to renew is not needed.
Note this article with a South African perspective on such agreements. The first point is
When agreeing to participate in a secondment, the terms of the
secondee’s employment contract will inevitably be varied. The
secondment agreement must therefore provide that the secondee agrees
to the variation of the terms of their employment. The employer must
therefore ensure that the secondee agrees to the arrangement before
concluding the secondment agreement. The secondee must be a party to
the agreement or otherwise consent to the terms affecting the
secondee
though it is IMO a leap to conclude that the terms of your contract with X is inevitably varied. It might be: so check what your contract with X says. Did they unilaterally change the terms of your employment? Or is this reassignment consistent with those terms? Still, you have implicitly accepted such a reassignment by continuing for a year to work for Y without objecting to the renewal.