How does the neocortex distinguish between perception and imagination?
Short answer
Perception and imagination in the visual system use pretty much the same neural machinery, but in opposite directions - perception goes bottom-up, from the periphery to the central nervous system, while imagery uses the top-down approach, travelling from the higher associative cortices to the lower visual areas in the brain.   

Background
The distinction between perception and imagination has received a lot of attention in the visual sciences. For example, imagery in congenitally blind individuals versus late-blind individuals is an interesting distinction to make with far-reaching consequences in certain fields of research (e.g. (Kupers et al., 2001)

Perception in the visual system goes from the periphery (retina), via the brainstem (LGN) to the striate cortex (V1) and higher extrastriate areas (V2-V7, see Fig. 1). 

Content-related activation during imagery in visual extrastriate cortex is thought to be governed by “top-down” mechanisms in parietal and frontal cortex that mediate the retrieval of object representations from long-term memory (Ishai et al., 2000). Visual imagery and visual perception draw on most of the same neural machinery. However, albeit the vast majority of activated areas are activated during both conditions, the spatial overlap is neither complete nor uniform. The overlap was much more pronounced in frontal and parietal regions (higher visual areas) than in temporal and occipital regions (lower visual areas) (Ganis et al., 2004).

I can't supply you with references on your following questions, but I wouldn't see any reason why the brain couldn't... 


  [...switch between] perception and imagination states, or [carry imagination and perception] out simultaneously


Basically, perception and imagination are two separate processes sharing large parts of their pathways, but not being identical.


  When an area sends information to another one, how does it signal whether this was perceived or imagined information?


This distinction is quite clear and pronounced, as perception is bottom-up (retinae to extristriate areas), whereas imagery is top-down (extrastriate areas to striate areas in the cortex). 


  Is there less of a distinction between the two than I'm thinking?


Indeed they are pretty similar as discussed and referenced above.


Fig. 1. Visual system. source: Shumpei Ogawa

References
- Ganis et al., Cognitive Brain Res (2004); 20(2): 226-41
- Ishai et al., Neuron (2000); 28: 979–90
- Kupers et al., Front Psychol (2011); 2: 19