does wp function the_content(); accept another tag inside

Why do you want to put your code between the braces in the_content()? What are you trying to accomplish?

Maybe this solves your problem?

<?php
    $custom_attach = get_post_meta( get_the_ID(), 'wp_custom_attachment', true );
    $name="button";

    if(!empty($custom_attach)) {
        echo '<span class="icon-download">';
        echo '<a href="'.$custom_attach['url'].'">'.$name.'</a>';
        echo '<span>';
    }

    the_content();
?>

This echoes the <span> -element with the class icon-download first, and then the content of the post.