Does the "messages from iphone" icon only appear in the dock when my messages are opened from my iPhone? I was working the other day on my Macbook and this icon popped up. My phone was not with me. Does that mean whoever had my phone just went through my messages? Is it safe to accuse them?

I didn't have my phone the entire 16 hour day. Somewhere around halfway through the day, it popped up.
It could be, if your iPhone was around (within the same Wi-Fi range as your Mac), but one could never be 100% certain, as it could be a bug in Handoff.