Detection is probably the hardest part because the object doesn't emit and has no gravitational mass. It is a opaque disturbance in space. So the first problem: how does the Unknown Space Agency know the object is there, how far it is, and how fast it is going?.
The only way they can is through occultation and parallax. By random chance, there is some object of little interest to anyone else except the space agency at interstellar distances.
This object of interest or its environs must be wide enough to cover at least about one arcminute. Then, at time = 0 months, the Space Agency sees a dark blob where no blob should be, in position marked as a-red.
Six months later, the blob has moved and is now visible in position b-red. Six months later, at t=12 months, the object is visible in position c-red. Simple geometry tells us that this object that zips to and fro must actually be a large opaque object in positions corresponding to the three black dots.
This might also be reinforced by the increase in apparent angular diameter, if the background allows such measurements.
The linearity of the trajectory tells the scientists that the object must be moving under propulsion, because it doesn't seem to follow a conic; and the lack of reactions from the farthest planets, should they be in position, tell them that the object has negligible mass.
Keeping the secret wouldn't be difficult at all - a Sun-sized object might be as close as Jupiter and it wouldn't be detectable except by chance (again).
The real problem
I doubt that the Space Agency would see the object as a threat until much later. It looks like a dense cloud of cosmic soot, perfectly opaque but nearly massless. When it arrives nearer (but we're talking Jupiter range or less), it will be clear that the Sun's light pressure doesn't dispel it. At that point yes, the likely explanation will be "cosmic swarm of killer machines":
- almost massless
- approaching by stealth, therefore probably hostile
- under propulsion given its trajectory and the fact they're targeting Earth
But long before that, the secret would have been classed as "not worth it" and would have been leaked.
I had not realized (lack of sleep, sorry) that your question is on the same line as this. There is perhaps a way of indicating clear and present danger, if the dark object leaves behind a trail of darkness and/or 'disappeared' worlds, or moves from planet to planet on a constant-angle-of-attack trajectory. This scenario could be integrated with the realization that some large Kuiper belt object has disappeared.
Those looking for, say, Sedna could believe they aren't able to detect it reliably (and it takes some equipment to detect it anyway); realization that the dark object has passed where Sedna ought to have been, on the part of the Unknown Space Agency, would lead immediately to the strong suspicion that the two facts are related.
Then even the quiet disappearance of Pluto years later would be immediately spotted. A constant-angle-of-attack trajectory in space spells "Self-propelled. Non-sentient. But alive" to most scientists, because it is not produced by gravitation (hence, propulsion), indicates volition, and yet it is inefficient and wasteful.
At this point the uncertainty about what the object could be, and whether the data are to be believed, etc. might lead to secrecy and cover-up (if the encounter is still fifty years in the future, though, they still might not bother, or rather try to capitalize on the fact. Which would lead to conspiracy theorists vocally declaring that there is no such object).