i haven't done this myself, but it should be fairly straightforward.
have a flag somewhere (on the customer/visitor table ?) for an account.
if true, then the add to account button is available at checkout.
when checking out via this method, instead of processing via c/c or paypal, bypass this, store the order and order details as usual and go straight to the confirmation page.
you could perhaps assign an order status to the order table which shows the order is on account ??