“Very sorry, sir. I didn’t mean to, er...” The embarrassment was still reddening Jackson’s cheeks when he found the paper-knife at the bottom of the case. “I think I’d better keep this though, if you don’t mind, that is, sir.”
I think I’d better keep this though, if you don’t mind, that is, sir.
That refers to the suggestion of keeping this; the sentence could be rewritten as
If you don’t mind, sir, I think I’d better keep this.
The reference to “sir” not minding comes as an afterthought after the suggestion. The person doesn't seem to be too sure of himself while speaking, and when he suggests keeping “this”, he immediately thinks of adding that his suggestion is subject to the approval of the person he's talking to. This construction is quite common:
Maybe we should attack right away, if you approve, that is, commander.
This would make a perfect gift, if you agree, that is, milady.
At dictionary.com, that is definition 16 under the idioms. The sentence you use just changes the word order a bit, but it is explaining, clarifying or giving more information. If we simplify the word order, it would be as follows:
- I think I'd better keep this though, that is if you don't mind, sir.
The person is clarifying their intent to keep the knife, they will keep it only if Jackson doesn't mind.