[1] Don't write off your results until you have that piece of paper in your hand. Things will often have not gone as badly as you think.
[2] It is better to try to apply to medicine as a first degree if you can, rather than relying on the possibility of graduate entry - graduate entry and its funding is changing, and there is uncertainty as to what its future holds.
[3] As has been said, talk to your teachers. See what they reasonably think you are heading for. Do YOU think you could push BBB up to AAA if this is what you get? If so, and your teachers are willing to predict you as such, then go for it. If they won't, but you nonetheless end up with AAA, much better to take a gap year and apply with the AAA.
[4] Foundation years are normally for people with disadvantaged backgrounds or those who didn't take the right A-levels.
Continue to prepare as if you're applying this September, enjoy your summer, and wait until you have your AS grades in your hand before making any big decisions.