Let $G$ be a (non-abelian) $p$-group with $G/Z(G)$ abelian. Then $G' \subseteq Z(G)$, so certainly $G$ is nilpotent of class $2$. Put $p^a=$exp$(G/Z(G))$ (which equals the maximum order of the elements of $G/Z(G)$, since the latter is an abelian group).
We claim that $G/Z(G)$ must contain at least two direct factors $C_{p^a}$, that is $G/Z(G) \cong C_{p^a} \times C_{p^a} \times A$, with $A$ a (possible trivial) abelian $p$-group. Now $G/Z(G) \cong C_{p^a} \times C_{p^{a_1}} \times \cdots \times C_{p^{a_n}}$, for certain non-negative numbers $a_i$, with all $a_i \leq a$. We must show that there exists an $a_i$ with $a_i=a$, so assume for the moment that all $a_i \lt a$.
Let $x, x_1, x_2, \ldots, x_n$ be corresponding inverse images of the generators of the cyclic direct factors of $G/Z(G)$. Of course, $[x,x_i^{p^{a-1}}]=1$, since for each $a_i \lt a$, we have $x_i^{p^{a-1}} \in Z(G)$. The commutator map is a bilinear map, since $G$ is of nilpotent class $2$, yielding $[x^{p^{a-1}}, x_i]=[x,x_i^{p^{a-1}}]=1$. This means that $x^{p^{a-1}}$ centralizes the inverse images of the generators of $G/Z(G)$, so $x^{p^{a-1}} \in Z(G)$. But this implies that $xZ(G)$ has order smaller than $p^a$, which is a contradiction, proving the claim.
This shows that groups like $C_p \times C_{p^2}$ or $C_p \times C_{p^2} \times C_{p^{10}}$ and many other examples, cannot appear as the inner automorphism group of a finite $p$-group.