can I use a momentary button on a analog pin?

so I will still do the 5v and a 220 ohm on one leg of the button and the input pin (Ao-A15) on the other leg of the button?

Why are you adding a resistor? Use the internal pullup resistors. Connect one leg of the switch to the digital pin (A0, for instance) and one leg to ground. Declare that A0 is an INPUT and enable the pullup resistor.

will I need to change the code any other and declaring the analog pin as a in not a out?

Yes. You won't be using analogRead(). You will be using digitalRead(), just like the switch was on the other side of the board.