Then, when Paul says: may the God of peace himself sanctify you wholly, he interjects a prayer; and he does three things. First, he prays on their behalf; secondly, he indicates that his prayer will be heard; and finally he issues special admonitions. Paul says, I have given my advice; but remember that nothing will come of it unless God gives you grace. Therefore, may the God of peace himself sanctify you. "I am the Lord who sanctify you" (Lev. 22:32). Wholly, that you may be totally holy, and this in order that your spirit and soul and body be kept sound.
On account of these words, certain ...people maintained that the spirit in man is one element and the soul another, thus positing two souls in man, that is, one which animates the body and another which carries on the function of reasoning. These opinions are rejected in the Church's teaching. For it should be realized that these two elements, which are really one, do not differ essentially, but only by reason of the powers present in them. There are certain powers in our soul which are linked to bodily organs, such as the powers of the sensitive part of the soul. And there are other powers which are not linked to bodily organs, but function apart from the body, insofar as they are the powers of the intellectual part of the soul. The latter powers are regarded as spiritual powers in that they are immaterial and separated in some manner from the body in that they are not functions of the body but are referred to as the mind. "Be renewed in the spirit of your minds" (Eph. 4:23). Yet it is called the soul insofar as it animates the body, for this is proper to it. Paul speaks here in a specific sense.
Now there are three elements involved in sin: reason, the sensitive appetite, and the actual actions of the body. Paul is anxious that all three of these areas be free of sin. Since he wants reason to be free of sin, he says: may your spirit, that is, your mind, be kept sound. For in every sin, reason is corrupted in the sense that every bad person is in some way ignorant. There should be no sin in the sensitive appetite either, and Paul refers to this when he says: and soul. Nor should there be sin in the body, and so Paul adds: and body. This, however, is achieved when the body is preserved immune from sin.
Paul also says: and blameless, instead of "not without sin" which may be attributed only to Christ; but to be "blameless" may also be said of those who, although they may commit venial sins, nevertheless have not committed grave sins by which their fellow men may be scandalized. "Walking in all the commandments and ordinances of the Lord blameless" (Lk. 1:6). And Paul adds, at the coming of our Lord Jesus Christ, that is, persevering until the end of life. Or, perhaps the word spirit may refer to the gift of the Holy Spirit, as if implying: may the gift of the Holy Spirit which you have be unimpaired.
Source: Commentary on 1 Thessalonians