Frege thought that the semantic power of an expression consists in its being associated with an extra-linguistic item. Even a whole sentence has a Bedeutung or reference, namely one or the other of the two Platonic objects 'The True' or 'The False'. Thus the Bedeutung or Reference or Signification of a complete sentence consists in its being True or False.
According to him, the semantics of the sentence is compositional. Each significant expression has a semantic value which affects the truth-value of the sentence in which it occurs. The semantic power of a a concept expression such as '- is wise' is to signify a Concept, a Platonic extra-linguistic entity which maps all and only wise objects to the value 'True'. The semantic value of a singular term is also an extra-linguistic item, an Object such as Socrates. Thus the proper name 'Socrates' has the role of introducing an object to the concept-expression '- is wise', thereby determining the Truth Value of the sentence 'Socrates is wise'.
If a proper name (eg. 'Bilbo') fails to be associated with an extra-linguistic item, it fails to introduce an Object to the concept-expression with which it is combined. As a consequence, the resulting sentence will (according to Frege) lack a Truth-value. It will signify neither the True nor the False and thus, since the signification of the sentence consists in its being True or False, will lack a signification. Thus Frege writes
A sentence can be true or untrue only if it is an expression for a thought. The sentence "Leo Sachse is a man" is the expression of a thought only if 'Leo Sachse' designates something. And so too the sentence "this table is round" is the expression of a thought only if the words 'this table' are not empty sounds but designate something specific for me" (Posthumous Writings, p.174).And again:
Names that fail to fulfil the usual role of a proper name, which is to name something, may be called mock proper names ... Instead of speaking about fiction we could speak of 'mock thoughts'. Thus, if the sense of an assertoric sentence is not true, it is either false or fictitious, and it will generally be the latter if it contains a mock proper name. Assertions in fiction are not to be taken seriously, they are only mock assertions. Even the thoughts are not to be taken seriously as in the sciences: they are only mock thoughts ... The logician does not have to bother with mock thoughts, just as a physicist, who sets out to investigate thunder, will not pay any attention to stage-thunder. When we speak of thoughts in what folows we mean thoughts proper, thoughts that are either true or false. (Posthumous Writings, p. 130, my emphasis).In summary. The philosophical word 'reference' derives its meaning as a translation of Frege's word Bedeutung, meaning signification. The signification of a complete sentence consists in its signifying the True or the False. Thus, on his account, a fictional name, which fails to introduce any Object to the Concept-expression to which it is adjoined in a complete sentence, and thus cannot contribute to the Truth value of the sentence, cannot have a signification either.