It is a common historical trend to unnecessarily assume that any function must be given by a formula of some sort. In the modern approach to mathematics this is absolutely not the case. The 'rule' in the explanation above of how to think of functions does not need to be a formula or even potentially expressible as one.
More rigorously, a function $f:A\to B$ is a certain relation, that is a subset of $A\times B$. The cardinality of all functions $f:\mathbb R\to \mathbb R$ is greater than the cardinality of expressions of possible formulas and so there are more functions than there are formulas describing functions.
It should be noted that some debate on the meaning of 'function' in calculus during the years of the formation of the subject existed. Things that today we accept as functions, such as the Dirichlet function and Bolzano's or Weiestrass' nowhere differentiable continuous functions, were not always considered functions.
So, the use of the word 'rule' in your question is just a heuristic or mnemonic or intuitive concept to talk about what functions are in some intuitive plane. The definition of function employed today is set-theoretic and leaves no room for ambiguities (unless you consider the axiom of choice an ambiguity) or, I'm afraid, for your question.