We report measurements of the in-plane magnetoelastic coupling in ultra-thin Ta|CoFeB|MgO layers as a function of uniaxial strain, conducted using a four-point bending apparatus. For annealed samples, we observe a strong dependence on the thickness of the CoFeB layer in the range 1.3-2.0 nm, which can be modeled as arising from a combination of effective surface and volume contributions to the magnetoelastic coupling. We point out that if similar thickness dependence exists for magnetoelastic coupling in response to biaxial strain, then the standard Néel model for the magnetic anisotropy energy acquires a term inversely proportional to the magnetic layer thickness. This contribution can significantly change the overall magnetic anisotropy, and provides a natural explanation for the strongly nonlinear dependence of magnetic anisotropy energy on magnetic layer thickness that is commonly observed for ultrathin annealed CoFeB|MgO films with perpendicular magnetic anisotropy.