Is there some kind of document (ID card or something else) a foreigner can get in Poland that would have a "numer dowodu osobistego"?
No. Under Polish law only Poles can have a dowod osobistego. The ID card given to permanent resident foreigners uses a different numbering format. The certificate given to EU citizens exercising their right to live in Poland has neither a number nor a photo.
Does anyone know how to go about this?
I just tell people to make my passport number fit their form.