Unfortunately, I do not think there is an easier way to do this.
You basically have three options:
dojo.contentBox(node) // excludes border, padding and margin
dojo.position(node) // includes border and padding; excludes margin
dojo.marginBox(node) // includes border, padding and margin
So you need to do what you suggested. Use dojo.contentBox(), then separately calculate the width of the upper and lower borders.
<div> <div>, div div. dojo.position() div.
<div id="outer" style="border: solid #000 1px;">
<div id="inner" style="height: 20px; padding: 2px;">.</div>
</div>
<script>
alert(dojo.position("inner").h)
</script>