Dumbledore was probably acting as the executor of Sirius's will, giving him temporary control over Kreacher.
This question is partly answered in the comments by user62159 but I thought I'd put some flesh on the bones.
It really comes down to the mechanics of how objects from a will are passed over from the deceased to the recipients in Harry Potter. The closest parallel we have is how Dumbledore's own will is handled. In that case the will's contents were controlled by the Ministry of Magic temporarily and handed on to Harry, Ron and Hermione at a later date. In the interim, Rufus Scrimgeour acted as the executor of Dumbledore's will.
Dumbledore didn't have a house-elf of his own so we don't see Scrimgeour handling that situation. It's likely that if Dumbledore had had an elf that Scrimgeour would have been able to summon him/her just like Dumbledore did.
The specific circumstances of Sirius's will are described as follows:
“Well, Harry,” said Dumbledore, turning toward him, “a difficulty has arisen which I hope you will be able to solve for us. By us, I mean the Order of the Phoenix. But first of all I must tell you that Sirius’s will was discovered a week ago and that he left you everything he owned.”
(Half-Blood Prince, Chapter 3, Will and Won't).
Dumbledore says that the will "was discovered" - but doesn't give any details about who had been allocated the task of executing the will. However, it seems reasonable to suppose that, since Sirius trusted Dumbledore and since it was Dumbledore who gave Harry the news that he'd inherited Sirius's house, elf and possessions, that Dumbledore had been formally allocated that task. This would just have been a temporary responsibility; he was never Kreacher's owner. Dumbledore had the ability to control and summon Kreacher whilst fulfilling his duties as the executor of the will but he couldn't keep him indefinitely. How long that temporary power lasted isn't made clear. It may well be 31 days, which is the time period that the Ministry is allowed to hold suspicious items before it has to hand them over to their new owners.
“So why have you decided to let us have our things now? Can’t think of a pretext to keep them?”
“No, it’ll be because the thirty-one days are up,” said Hermione at once. “They can’t keep the objects longer than that unless they can prove they’re dangerous. Right?”
(Deathly Hallows, Chapter 7, The Will of Albus Dumbledore).
Dumbledore is trying to establish whether, at the end of this temporary period, Kreacher will pass onto Harry, Bellatrix or someone else. But, until Kreacher did pass into new ownership, Dumbledore had the ability to summon him at will.
As for the point about Harry being able to summon Kreacher, this is correct. I suspect that the reason he was rather theatrical in summoning the filthy Kreacher into the Dursleys' spotless house is the same reason that he keeps the mead glasses bouncing off their heads repeatedly.
Harry could not suppress a suspicion that Dumbledore was rather enjoying himself.
(Half-Blood Prince, Chapter 3, Will and Won't).