Prussia could have chosen to cede these areas, if Germanness was considered important to the leadership in the 2nd Reich. (Instead they discriminated the Poles, didn't they?)
Yes Prussia could have gotten rid of the Polish areas. But you have to realise what the Unification of Germany actualy was:
Prussia using German nationalism to strengthen Prussia as much as possible.
That is why for example Austria never became part of Germany, because it would weaken the influence of Prussia in Germany. Of course Prussia would not lose the Polish areas, because that would mean less influence/power for Prussia.
We were just told above that Denmark was rejected to avoid threatening Britain. (Whether the Danish parliament and population would have agreed with their king is another matter.)
The last part is very important for assimilation of the Danes. If the Danish population does not want to be German, they will not assimilate into Germany and will not consider themselves German, just like the Poles never became German.
Could Denmark be part of Germany? In theory yes, I guess so. Well, maybe not. What the Danish king offered (as far as I know) was Denmark becoming part of the German Confederation, which was not actualy the German Empire. Several parts of the German Confederation did not end up becoming part of the German Empire, like Luxemburg, like (Dutch) Limburg, like Austria and Lichtenstein. The German Empire was founded in 1871, not before. It was an agreement between several German states to unify and several states remained outside of it. It is very likely that Denmark would not join those states, even if they had become members of the German confederation.