TLDR
- We don't really have an exact answer for what a machine spirit is...
- We don't really know if machine spirits are real either... I don't think so...
- The Black Library has not definitively explained the machine spirit or the inter-connectivity of man and machine, but we do have examples such as you have read to give us a base understanding.
- It is possible to mistake AI as a machine spirit, but that depends on the AI and the one inspecting it.
The machine spirit is not really explained very well in the 40k universe. This has a number of people in debate on what even constitutes a machine spirit. I think this also is perpetuated by Guardsman and others we read about that are not associated with the Priesthood of Mars referring to their gear as having machine spirits, without verification from a Tech Priest... I used to think it was just the more advanced machines that had automated functionality, but that is not the case.
Anything that a follower of the Cult Mechanicus would deem to have a machine spirit will have been blessed with oils and chants to keep the device's machine spirit happy. I do not remember ever reading anything about a lasgun being blessed before battle (though the cleaning kit undoubtedly has some oils that could count), but boltguns and power armour have been blessed with oils and chants before battle without question. These are not automated by any respect, which is how I previously corrected the error of my ways...
I mention the most basic technologies that can have a machine spirit to show just how vast the complexity and range of the machine spirit is. From (possibly) the lasgun, to the boltgun, to power armour, to land raiders, to titans and battle barges all these devices have a machine spirit, and the complexity between them is drastic. Basically anything that one could say, "the device failed because its machine spirit was not satisfied," that machine has a machine spirit.
Once you get into the more complex machines it gets tricky. If an automated machine is complex enough with multiple functions, perfect situational programming, and even perfect error correcting programming the machine can be trusted to operate on its own as if it were a living being. For machines like a titan or battle barge that can be interfaced directly with someone's mind and communication between the two is seamless it would be like having a conversation with another being or using their senses as your own.
Personally, I think that the idea of the machine spirit is just more of the confusion of the 40k universe and humanity trying to explain what they don't know anymore from all the knowledge that has been lost... There is no machine spirit... it stopped working because you didn't take care of it and a component failed; not because it was angry... As far as I know only the Orks have the capability of making something a reality because they believe it to be true...
A clear example would be Rynn's Might. This Crimson Fist land raider defeated an entire Ork Warband without a crew or outside direction. When it was attacked the vehicle's systems activated and proceeded to kill all the Orks outside the fortress-monastery, including the Warboss, all on its own. The vehicle itself simply functioned based upon its extremely complex programming and did what the original programmer told it to do in certain situations. However, without the understanding of why the vehicle did what it did humanity is left to the idea Rynn's Might is just another example of how impressive and capable the machine spirit is.
For humanity, if someone believes that a machine has a spirit or soul then it is not a grand step for them to think that the programming or functionality of a machine is indicative of the machine having a personality or moods; such as your character thinking that a millennia old, unknowingly complicated machine taking its time to turn on would be stubborn to wake up.
Regarding AI, there are not any known AIs in use by the Imperium. Because they were outlawed, like the men of iron, there are no known instances that currently exist. The only AI that can be addressed are xenos, like Necrons or something similar.
That said, looking at the possibility of humanity mistaking an AI for a machine spirit, it is possible, in my opinion. I have not read anything that states someone can not interface with an AI such as @TerranGaming states in his answer, but assuming such a connection is possible it would not be a stretch for someone to mistake an AI for a machine spirit.
The step below artificial intelligence is virtual intelligence, something that mimics intelligence based on its complex programming. Believing that a device has a spirit and moods, but isn't AI leaves the only option to be a VI, which is entirely accepted.
If the AI does not give itself away then the individual inspecting it would likely not suspect anything. Given how complex programming is in the 40k universe and the fact that people think machines have a spirit it seems rather likely to me that without extreme deviation from what that individual has seen before in similar machine functionality they would believe an AI to just be a more moody machine spirit...