Measurement of the inclusive and differential $\mathrm{t\bar{t}}\gamma$ cross sections in the dilepton channel and effective field theory interpretation in proton-proton collisions at $\sqrt{s} =$ 13 TeV