If you refuse a secondment proposed by your company, this cannot be a reason for dismissal, unless your employment contract includes a mobility clause providing for secondments.
This mobility clause is traditionally included in the employment contract and provides that the place of work may be modified more or less often (in the context of a business trip, a transfer or a secondment). Once signed, you cannot opt out of this clause. In other words, if you refuse to apply it, you risk dismissal for serious misconduct (i.e. immediate departure without notice or compensation) or, at least, for real and serious reasons if the grounds for refusal are justified or if the implementation of the employer's clause is questionable.
Secondment is characterized by maintaining the subordinate relationship between you and your home employer. In other words, you remain under the authority of your home company. Therefore, if you commit a fault in the performance of your duties, the host company can only refer to your home company and cannot sanction you itself.
That said, and for obvious practical reasons, it sometimes makes more sense for your home company to delegate its authority to the host company. You have the right to read the text by which your home company delegates its authority. And above all, this text must be included step by step in the secondment amendment or the engagement letter added to your employment contract.