Go to the Interface Options and turn on the option to show player names on yourself.
If you are flagged, your name is in Green above your head, else it is in blue.
Attacking any "yellow colored" player (their names above their head) will flag you. If you are already flagged, such players are colored red instead of yellow.
You can get a small addon called PvPCooldownReborn that shows a small 5 minute countdown timer whenever you get flagged. Not sure if its still being updated. So if the countdown is visible, you're flagged, if it isn't, you're not (for a PvE server).