Thoughts that are not deliberately invited are not sinful. Thoughts contrary to purity that one desires not to have and which one does not deliberately take any pleasure in are not sinful.
If one imagines oneself married and involved in a conjugal relationship in marriage in the imagination, this *could *be sinful.
We need to remember that our sexual identity is a very powerful human instinct and at different ages is more pressing than at other ages. āFull consentā can involve many factors which may lessen or even eliminate āfull consentā as understood in Catholic moral theology.
If one is in doubt about what is or is not sinful, the best thing to do is to ask a priest and this can be done in Confession also. Having asked a priest and received an answer, try not to second guess him and get advice elsewhere as this can confuse the matter for oneself. If Fatherās answer is not clear, then go back to him and have it clarified.