How to display sticky post with custom html

Your code looks odd to me, typically to insert something between posts you add a counter and count each loop, then add custom code on a particular count, this is for the main loop, for a non main loop or secondary loop us wp_query.

<?php if (have_posts()) : ?>
<?php $count = 0; ?>

<?php query_posts( 'posts_per_page=9' );?>
<?php while (have_posts()) : the_post(); ?>

<?php $count++; ?>

<?php if ($count == 4) : ?>

 // Your custom sticky post and html goes here

<?php else : ?>

 // the regular loop code goes here such as the below

<h2><a href="https://wordpress.stackexchange.com/questions/16504/<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
<?php the_excerpt(); ?>

<?php endif; ?>
<?php endwhile; ?>
<?php endif; ?>