If a member is logged in when they place an order, that order will be associated with their account. The rest of the time they may log in / out and the order will remain associated with the session.
The way for a user to specify they don't want to become a member is by leaving the password fields blank on the checkout page. Usability could be further improved by adding a checkbox with the question "do you want to save your details?", which would show the password fields via ajax only when the user checks the box.