So you need to override the root\app\design\frontend\base\default\template\checkout\success.phtml
template file and use the above code directly for the same.
OR
You can also create a function e.g. isReturnable($orderId) in class Mage_Checkout_Block_Onepage_Success
but don't modify the core block you need to override in your local module.
[UPDATE]
$items->isReturnable();
code never return anything as you are try to get the property of an item on item collection, It will only worked with item object and this should be
$item->getIsReturnable();
So your code should be looks like
<?php
$order = Mage::getModel('sales/order')->loadByIncrementId($this->getOrderId());
$items = $order->getItemsCollection();
$isReturnable = false;
foreach($items as $item){
$isReturnable = ($isReturnable)? $isReturnable : $item->getIsReturnable();
}
?>
<?php if($isReturnable): ?>
<div class="shipping-message"><?php echo $this->__('Return exceptions apply to an item
in your order.'); ?> <a href="/return-exceptions/">Click here for details</a></div>
<?php endif; ?>