you would need to have a column in the cart that stores the ItemCatID.
then use a loop through the cart items, to see if that column has any items that equal 6.
If there are, set a variable to true, and use that variable in an if statement around the link, for example:
<?php
$catSix = 0;
while (!$eCart1->EOF()) {
if($eCart1->DisplayInfo("ItemCatID") == "6") { $catSix = "1"; }
$eCart1->MoveNext();
}
$eCart1->MoveFirst();
?>
<?php if($catSix == "1") {?><a href="http://www.mydomain.com/page.php">LINK</a><?php } ?>