This is a difficult one to answer, and here are my personal thoughts.
Firstly, it depends on the stage the person with dementia is at.
There are stages where they may become very agitated and frustrated.
There are medications that can cause people [with or without dementia] to act differently than they normally would.
There is opportunity. If a knife or a gun is lying around, the person may grab it, not realising the possible consequences. This happened for us when my wife threw a knife at me; no malice, but it happened to be in her hand at the time.
Dementia means that the person no longer realises the consequences of things they may do, and they may not realise that the person across the room from them is their husband/wife/child. They may think they pose a physical danger to themselves.
In a car, as driver or passenger, they can do dangerous and possibly fatal things.
In a kitchen, a gas stove can be turned on and not lit.
The carer may try and argue with someone with dementia. Never any point in that and it just can make them more agitated. There is no logic to be argued about any more!
To round this up, I think it is possible for someone at a certain stage, given the opportunity, and the wrong circumstances, to do another person harm. It would not be the person with dementia doing this, it would be the dementia itself.
We should always try to ensure that possibly dangerous items are not available to anyone with dementia, but this is probably almost impossible to do as almost anything can be used wrongly.
Am I to assume that you would use the dementia in mitigation of the shooting?
Also, are you in the US?
If you are in the UK, then do call the Alzheimer's Help Line. This won't be much use to anyone outside the UK, but there will be support services wherever you are, I am assuming.