Between about 1800 and WWI there was no Poland. It was partitioned between
Russia, Prussia, and Austria. There was a Kingdom of Poland which was part
of Russia in the 1840-1900 period you are talking about. So your ancestor
was >from Polish Russia or Russian Poland or Russia or Poland.
Posen was in Prussia and on the census, they apparently claimed Germany-it
would have been Prussia in the 1840's as Germany was formed in 1871.
A cousin of mine came >from Augustow, Poland (then Russia) but he was born in
Marseilles, France! Such things happened. Perhaps your family moved, or
fled as this cousin's family->from famine, cholera, and rebellion.