Without seeing the image, the answer is No it’s not a case of one or the other, it’s a fairly straightforward process, but one you can’t expect the camera to do automatically.
when mixing ambient light and flash; the principal is that you are dealing with 2 separate exposures, the easiest way to do it is to choose your ambient exposure and fix it in manually. Here you will be choosing whether you want that to be exposed ‘well’, or underexposed to feature a sunset etc.
Then your flash exposure can often be left on auto, or tweaked with exp compensation. But if your subject is changing a lot, then setting s manual flash exposure might be the right choice.
Given the above; that you’re balancing 2 exposures, how would your camera know which was most important to you?
The cameras auto setting isn’t much cleverer than choosing a max ISO when you turn on the flash, then deciding whether the flash is ‘fill’ (In brighter light) or the main light source (when it’s darker).
Simply understanding there’s 2 separate exposures to consider makes life simpler.
I haven't seen the picture so I'm just guessing and I'm also assuming that we're talking about making changes to an existing picture as well as talking about taking another one and getting a better result?...
With the existing picture... In my processing software it's possible to select something within the frame such as a person and make changes to the selected thing or to everything except that thing. So, it should be possible to select a person and either lighten or darken the person or the background and indeed make some other changes too such as contrast etc. All this could have other effects such as increasing noise but that if it happens it could also be at least partially delt with.