Getting attachment post using wp_get_attachment_link

Yes, if you pass third ($permalink) parameter as true in wp_get_attachment_link() image will link to attachment’s page not image itself. You can use wp_get_attachment_link filter to change behavior of that parameter, but in this case it simply means overwriting whole function. Instead I would use wp_get_attachment_image() and get_permalink()

UPDATE

Maybe wp_get_attachment_image() would fit in this situation better. Here’s also how your snipped would look like:

if ( $attachments ) {
    foreach ( $attachments as $attachment ) {
       echo '<li>';
       echo '<a href="' . get_permalink( $post->ID ) . '">';
       echo wp_get_attachment_image( $attachment->ID, 'thumbnail' );
       echo '</a></li>';
    }
}