Yes, it was possible. The prototypical example would be Andrew Jackson, the son of recent Irish immigrants (his older siblings were actually born in Ireland - that's how recent his parents had immigrated before his birth). Jackson rose to the rank of Major General in the Army and, of course, eventually reached the highest office in the land in 1828 (inaugurated 1829).
It was certainly possible... Take a look at the lists of graduates of the United States Military Academy at West Point. Though many of the cadets were of course from the upper classes, they included among their ranks many from less well-to-do backgrounds, including that of Henry Ossian Flipper, who was the first black to graduate from the Academy and be commissioned-- he was born a slave.