Update MySQL query so that it functions again

mysql_fetch_object() was deprecated in PHP 5.5 and fully removed in PHP 7.0, which is probably why it no longer works for you. It’s always better to use WP functions – often they are wrappers for something in PHP (or elsewhere), but by using the WP wrapper version, it usually protects you from deprecation (since the WP method can be updated to accommodate the new scripting language changes) – that way your core code wouldn’t need to change.

Try using the $wpdb->get_row(). It’s pretty much the same as what you have, but more “WordPressy”:

function catImg( $catId ){

    global $wpdb;

    $data = $wpdb->get_row( $wpdb->prepare( 'SELECT * FROM `' . $wpdb->prefix . 'ig_caticons` WHERE `cat_id` =  %d', absint( $catId ) ) );

    if ( $data->icon ) {
        echo '<img height="158" width="121" title="" alt="skyway" class="attachment-post-thumbnail wp-post-image" src="'. esc_url( site_url( esc_attr( $data->icon ) ) ) . '"/>';
    } else {
        echo '<img height="158" width="121" alt="no-image" class="attachment-post-thumbnail wp-post-image" src="'. site_url( '/wp-content/themes/sky-way/images/no-image.jpg' ) . '"/>';
    }
}