Yes, the sentence is correct, but, as has already been pointed out, it's a little confusing.
... Or is it [the case] that it had just been temporarily loaned to me?
The first "it" is a dummy subject, so there's no ambiguity the second one would refer to the item in question. StonyB's suggestion works, and is more clear -- "Or had it just been [temporarily loaned to me?]" However, if you want to preserve the structure you have you can do that too.
I would move the word "just" to after the first "it" to help break up the sentence into more logical parts.
... Or is it just that it had been temporarily loaned to me?
This also puts the emphasis on the difference between the two situations you're comparing -- the one in which the item belongs to you, and the one in which it was loaned to you -- rather than on the action of loaning.
This is not more correct, mind you, it's just a stylistic preference that I think makes your sentence easier to read without changing it too much. All the options that have been listed are correct (your example, StonyB's comment, my suggestion), it really just comes down to how you want to word it.
Paola's comment addresses whether or not "loaned" is the correct verb to use here. There's nothing really objectionable about it in American English, even when not talking about money, but as she pointed out "lent" is preferable in British English.
Your first sentence ("But can I say that it really belongs to me?") is probably better worded as "But can I really say that it belongs to me?" From the little context I have it sounds like you're questioning whether or not you can claim ownership of [the item] at all. Not how complete your ownership of the item is. The logic behind this is similar to my comments above about moving "just" in your second question in that it changes the emphasis.