WP overwrites my setup_postdata() setup

Should all CPT “lecture” posts use this template? If so, just rename your file single-lecture.php and place it in the root directory of your theme, and WP will automatically use it due to its template hierarchy.

If instead you’re trying to assign this custom template to hand-picked pages, wherever you register your post type, add support for “page-attributes” and set your template up as a custom template by adding comments at the top.

CPT:

register_post_type('lecture'),
    array(...
        ...
        'supports' => array('title', 'editor', 'page-attributes'),
);

Template:

<?php
/*
 * Template Name: Customized Lecture
 */
...

You may need to unregister your CPT and then re-register it with this new code so WP recognizes the new attributes. Once your CPT has “page-attributes” you will see a new dropdown on the post editing screen, just like you see on Pages, that lets you select a template. You can then choose your template by whatever name you used in the comments at the top of the file.