Exposure compensation can be achieved by changing aperture, or shutter speed or ISO, depending on the shooting mode (P, A S) and amount of available light, and ISO mode. With flash, aperture and ISO changes the ambient AND flash, shutter speed changes only ambient. So, to answer your first question, it depends what parameter the camera adjusts when you apply exposure compensation. If you use Av mode and there is sufficient light, EC will change shutter speed and this will affect only ambient light. In very low light and ISO mode on auto, EC, on my camera at least, changes the ISO, so both flash and ambient are affected. In TV mode, EC will affect aperture so both flash and ambient are affected.
P mode is more complex. EC changes shutter speed and aperture alternatively so how EC affects flash exposure depends on how many stops you change EC.
If I managed to be clear enough in the answer to your first question, you have the answer to the second too. Ambient you control with shutter speed. Flash light you control with flash compensation which is different from EC. No real reason to use EC with flash. If you cannot increase enough the shutter speed in order to dim the ambient (you have reached sync speed limit), EC in AV won’t do anything, in TV it will change aperture and both flash and ambient are affected.