The context of 1 Cor 6 regarding defiling God's temple is sexual sin and it is quite clear on this. If we hyper analyse the things we put in us then we'll end up concluding everything defiles us but this is simply not so (very clearly in scripture too). I don't smoke myself and I'll encourage others to stop but I refuse to make it an issue of salvation. Moderation and responsibility need to take precedence and certainly abuse needs to be called out but broadly speaking I won't condem it or those who engage in it. If we envoke stumbling block verses then we are calling ourselves weak to which I say get over it and let God deal with the heart.
While 1 Corinthians 6:18 does focus on fornication only (taken from 1 Corinthians 5 of the man who was committing fornication in the church), Paul does not say that this is the only sin of concern. The very chapter itself talks about other various sins and how they which do such things will not inherit the kingdom of God (See: 1 Corinthians 6:9-10).
Also, while fornication alone is in view of the only sin done against the body (1 Corinthians 6:18) because one is joining themselves with an harlot (i.e. the two shall become one flesh) the truth expressed in the next two verses that says... “
know ye not that your body is the temple of the Holy Ghost which is in you, which ye have of God, and ye are not your own? For ye are bought with a price: therefore glorify God in your body, and in your spirit, which are God's” in 1 Corinthians 6:19-20 still holds true for other sins.
For it is still true universally that...
#1.
Our bodies are temples of the Holy Ghost, and we are bought and paid for with a price.
Verse 19 and the beginning of verse 20 is still is true in the fact that our bodies are the temples of the Holy Ghost and we are not our own and we are bought and paid for with a price. This truth does not change when looking at other sins because of the mention of 1 Corinthians 6:18.
How so?
In 1 Corinthians 3:16-17, it says,
“Know ye not that ye are the temple of God, and that the Spirit of God dwelleth in you?
If any man defile the temple of God, him shall God destroy; for the temple of God is holy, which temple ye are.” (1 Corinthians 3:16-17).
It mentions how we are the temple of the Spirit of God, and it mentions how we can defile the temple of God, and if we do, God will destroy us.
This was in context to the sins of strife and envy and the sin that caused divisions.
“For ye are yet carnal: for whereas there is among you envying, and strife, and divisions, are ye not carnal, and walk as men?” (1 Corinthians 3:3).
We see the sins of strife and envy mentioned in Galatians 5:19-21, and it says that they which do such things shall not inherit the Kingdom of God. Note: “To not inherit the kingdom” is a loss of salvation because we learn in Matthew 25:31-46 that to inherit the kingdom was to enter God's kingdom by helping the poor which was contrasted with not helping the poor equating with being told to go away into everlasting punishment.
We also learn in 2 Peter 2:1 about how there are false prophets and false teachers who cannot cease from sin (2 Peter 2:14), and they denied the Lord who bought them. So a person can be bought by Christ and yet not be saved on account of them being a false teacher or false prophet or on the account that they teach falsely that one cannot cease from sin (i.e. grievous sin that can destroy our souls in hellfire).
It is still true universally that we are to...
#2.
Therefore glorify God in your body, and in your spirit, which are God's.
The truth in verse 20 that we can glorify God in our body and spirit is not solely for not committing fornication only.
“Let your light so shine before men, that they may see your good works, and glorify your Father which is in heaven.” (Matthew 5:16).
We can glorify God by our good works (Which are done in the body) for all to see. We are to shine out the light of Christ unto men by the good works He does through us.
“That ye may with one mind and one mouth glorify God, even the Father of our Lord Jesus Christ.” (Romans 15:6).
We obviously glorify God with our mouths (Which is a part of our body).
“Whether therefore ye eat, or drink, or whatsoever ye do, do all to the glory of God.” (1 Corinthians 10:31).
This final verse above here makes it clear that whatever we do, we can do to the glory of God. Obviously the opposite holds true if we decide to sin in the fact that we can not glorify God if we sin and defile our temple. Obviously smoking is not something you can glorify God with your body because one is destroying their temple by smoking. They are self murdering themselves and in most cases other people. 1 John 3:15 says that no murderer has eternal life abiding in them.
So in conclusion:
While 1 Corinthians 6:18 is dealing soley with fornication alone, the truths expressed in 1 Corinthians 6:19-20 still holds true universally when talking about other sins and or in doing righteousness. For we should not sin (in general) because we are bought and paid for with a price. We should not sin (in general) because we should use our body to glorify God in all things.