We exercise several choices here. What to do with that thought, any thought - whether to pursue or drop it. And we choose what habits we practice and develop. We choose where we focus our attention - whether it is on our own thoughts or toward God. We choose, in varying degrees what we are surrounded with and what we feed our senses - whether it is true beauty, good sounds and sights, etc. These choices in turn affect what thoughts arise.
The choices we make are exercises of conscience, which is formed over time and properly formed becomes integrity, the Christian goal of becoming that which we were created to be. And our conscience comes ultimately from God.
We have these thoughts whether we want them or not. The only thing we may choose to do is dwell on the sinful thoughts that our nature brings to our attention or ask God that He forgive us and leads us from temptation.