Ok, then yes, that is definitely a violation of the realtor's duty to you as the client. They should have contacted you prior to the inspection to ensure that you had left the property open, or had given a key to the realtor so they could supervise any inspection. If the realtor wasn't on site to allow access, then since that is part of their job, you could file a formal complaint with the MD REC..
But in their defense, they can't really be expected to come back several times to complete an inspection as the buyer is presumably paying the inspector to get it done in one visit. So I can understand their desire to not have to return if they could gain entry without damaging anything.
And as part of the inspection, they do have the authority to move personal property around, as long as they don't damage anything, to ensure that a seller is not trying to conceal any problems with areas..
However, if anything is damaged or missing, then the inspector and realtor are liable for that because they left the property unsecured and should have made sure it was locked after inspecting.
I am not quite sure why the realtor didn't have a key to gain access to the entire house for inspection purposes as that is standard procedure. The realtor's job is to show the property and allow access to professionals for inspection purposes and should have had keys to be able to access all areas..