First, Bitcoins are not unique items, you cannot identify one Bitcoin from another, in fact that statement almost makes no sense. Bitcoins are values that are assigned to addresses. The addresses are unique
So far your understanding seems reasonable.
and each address has a currently Bitcoin value and transactions transfer values between addresses.
If you are trying to understand the technical workings of Bitcoin, then you've run into a situation where you appear to be missing some details here.
Each address has a set of unspent outputs. The total "value" that might be reported regarding that address woudl be the sum of all the unspent outputs. Transactions spend outputs, as inputs, and assign value to new outputs.
Secondly, it seems the whole system works because all the participants agree to play by the same rules.
Correct.
What prevents a rule change if everyone agrees to it.
Nothing. The difficult part is getting everyone to agree to the change.
Changing how many bitcoins are given to miners, how much the difficulty changes, etc. they are arbitrary.
There is some thought behind those design decisions, but yes, they are somewhat arbitrary.
What if a majority agree to a rule change?
Then the minority will continue to run software that enforces the old rule. Depending on the change, the blockchain will split, and there will be two different cryptocurrencies each trying to call themselves "Bitcoin" and each trying to convince people to accept their currency instead of the other.
Lastly, I read about Bitcoin theft. If I have a wallet of addresses that is backed up. A virus penetrates the wallet and transfers all my Bitcoins to some other address. Since I have the original addresses, I can see where they went. If I clearly demonstrate the above to the Bitcoin community, what's preventing the Bitcoin community from disallowing any transactions from any address that received my stolen coins? Yes it would be difficult to convince everyone but is it theoretically possible?
Theoretically? I suppose. But since the bitcoins aren't distinct unique identifiable entities, the value associated will quickly be mixed with value that did not come from your wallet. It will be sent to people who hadn't heard about the agreement not to accept the bitcoins. It will be moved through many addresses. It would also create a situation where individuals could perpetrate fraud by making false claims about their bitcoins being stolen (when they were actually just spent). To operate successfully as a currency, it has to be treated as completely fungible.