Spelling out non-cardinal small numbers

I understand that it's common to spell small numbers in words. However, all examples of this rule I could find use cardinals (i.e. expressing the size of a set of entities) like in:

  • We met two cats and seven dogs.
  • She has been driving for six hours.

My question is to what degree does this rule apply when one writes numbers as nouns rather than numerals? That is, which is the most 'correct':

  • He chose the number 2.
  • He chose the number two.
  • He chose the number 'two'.

It's a matter of style. Most writers spell out numbers under 10 and use numerals for the number 10 and above. But this is not the whole story. According to The AP Style, always spell out a number that begins a sentence except for years. The same source goes on to say that numerals should be used for the following:

  • Ages
  • Days of the month
  • Degrees of temperature
  • Dimensions
  • House numerals
  • Percentages
  • Proportions
  • Scores
  • Serial Numbers
  • Speeds
  • Sums of money
  • Time of day
  • Time of races
  • Votes
  • Years

I've learned that you spell out a number if the sentence only contains one number, or the sentence starts with a number.

I think the AP Style guide has the most complete list of exceptions to this rule.