This is a well-known problem in the philosophy of language and it is well-known that there is no simple answer. Neither of the two answers above even alluded to this fact. There are two answers commonly given, both of which are flawed. The first is that 'Tom is thinking of N' really means 'Tom is thinking of his idea of N'. The standard reply is that if we want to talk about an idea of a thing rather than the thing itself, we use expressions like "Tom's idea of N" rather than 'N'. Frege ("On Sense and Reference") says "When we say 'the Moon', we do not intend to speak of our idea of the Moon, nor are we satisfied with the sense alone, but we presuppose a reference. To assume that in the sentence 'The Moon is smaller than the Earth' the idea of the Moon is in question, would be flatly to misunderstand the sense. If this is what the speaker wanted, he would use the phrase 'my idea of the Moon'". I alluded to this above. I also added another argument. Let's grant that 'Tom is thinking of N' really means 'Tom is thinking of his idea of N'. But then you still have the same problem: 'Tom is thinking of his idea of N' also has the form aRb, and so logically implies that for some x, aRx, i.e. that for some x, Tom is thinking of his idea of x. If you try to avoid this by the same manoeuvre, you get trapped in an infinite regress.
Alongside this, it's very common to bring psychology into the question. E.g. Rex above says "There is some difference between thinking about actual objects and pretend ones, but it's cognitively subtle." But this is a logical problem, not a psychological problem. "Tom is thinking of Frodo" appears to have the logical from 'aRb', and in standard logic, aRb implies for some x, aRx. Any satisfactory answer either needs to take this on board, or to reject standard logic.
The second answer commonly given is that 'Ex aRx' follows, but 'x' ranges over all sorts of non-standard objects, such as 'non extant objects', whatever that means. Rex gives the example of the true proposition '3 < 4'. This implies that something is less then 4 (namely the number 3), even though the number 3 is not a physical or concrete object, but an abstract object. That's broadly correct, but doesn't answer the question. The problem was 'Tom is thinking of Frodo' in standard logic implies there is such a thing as Frodo. However, the second horn of the dilemma is that there is no such thing as Frodo. This is not analogous to the case of '3 < 4'. For there is such a thing as the number 3, and the number 4. But there isn't such a thing as Frodo.
So both of the well-known replies above are wrong, and it is also well-known that they are wrong.
Another standard reply are that 'Tom is thinking of Frodo' is false, yet another is that it is meaningless, since no proposition with a fictional name in it can have a truth value
My own answer to the question is simply that 'Tom is thinking of Frodo' doesn't imply that there is such a thing as Frodo, and so is consistent with 'there is no such thing as Frodo'. This means that we can't interpret it as having the logical form 'aRb'.