You will first need to loop through the cart products to check for the existence of the product that is required for the attribute.

Depending on where you want to place the attribute you need to be looking at the template files in YOURTHEME/default/template/checkout/onepage.phtml and YOURTHEME/default/template/checkout/onepage

    $cart = Mage::getModel('checkout/cart')->getQuote();
       foreach ($cart->getAllItems() as $item) {
       $productSku = $item->getProduct()->getSku();
       if ($productSku === $myProduct)
       { 
         $showAttribute=true; 
       }
    }
    
    if ($showAttribute)
    {
     // render custom attribute
    }

If the product is present you can show/set the attribute value.

You might find these answers useful

http://magento.stackexchange.com/questions/14163/adding-custom-attribute-to-customer

http://stackoverflow.com/questions/5961290/adding-attributes-to-customer-entity