You can't do it exactly like you suggested - since there is no method named owner on the number 1, you cannot call that method. You have to create the method first. This works:
\nclass Fixnum;\n  attr_accessor :owner;\nend\n\n1.owner = "me";\nputs 1.owner;\n

Cheers,
Ben