Arduino UNO: Using Analog Input as Digital In/Out

Are you sure ?
In my opinion the analog inputs do also have the internal pull-up resistors.