Firstly, I would always encourage photographers not to use the built in flash. You can buy a decent speedlight from Amazon for £40. Something by Aperlite or Neewer will suffice. You'll get infinitely better results.
Anyway...
Ah, the joys of flash photography. To keep things simple, when I'm using flash, I break down the shot in to 2 parts - the ambient light and then the flash part on top.
Firstly, for me, is easier to shoot in manual when using flash. It gives you that control over the camera making strange decisions. Shooting handheld indoors means you'll want to be in control of your shutter speed yourself. Therefore...
Camera in Manual. First select a fast enough shutter speed. 1/200s is good. Then select your aperture. Wider (smaller F number) is better, as it allows more light through the lens. Then set your ISO to auto. Without flash, take a shot. It should produce a fairly good exposure, but your ISO will likely be quite high indoors. Then, pop up your flash and take the shot again. It should produce a similar exposure but your flash will do some of the work to light the scene meaning your ISO will be lower. Job done.
The problem with shooting flash in aperture priority mode is the camera will never know how to balance shutter speed with auto ISO to get an exposure. You could try aperture priority with a small F number, then manually select a high-ish ISO yourself (maybe 800) and see what shutter speed the camera chooses when you take a flash shot. But you're still not in control of your shutter speed, meaning it could easily drop to 1/50s or so, resulting in blurred shots.
When I shot weddings indoors, I always shot with a manual shutter speed and wide aperture and left ISO in auto.