Inside the host you mean as on the PI? Given the current architecture, I
do not believe it is possible at all.
You need a fully fledged linux or macOS system to burn the image on a SD
card.
If you are on a raspbian, then you already booted it using the sole
SD-card slot that the device has, and you can't reformat it on the fly.
If though, you have set up some initial boilerplate project using a
linux or mac, burnt it on the SD card and booted your Pi from it, you
should be able to do incremental updates to the firmware over the air or
wire from you linux or mac.
HTH,
NobbZ