How do I get invoke_props_popup to work?
You simply forgot to set bl_options:

import bpy

def set_keyframe_position(flt):
    print (flt)

class KeyframeChangerOperator(bpy.types.Operator):
    """Let's you change keyframe position"""
    bl_idname = "object.keyframe_changer"
    bl_label = "Keyframe changer"
    bl_options = {'REGISTER', 'UNDO'}

    my_float = bpy.props.FloatProperty(name="Keyframe position")

    def invoke(self, context, event):
        return context.window_manager.invoke_props_popup(self, event)

    def execute(self, context):
        set_keyframe_position(self.my_float)
        return {'FINISHED'}

def register():
    bpy.utils.register_class(KeyframeChangerOperator)


def unregister():
    bpy.utils.unregister_class(KeyframeChangerOperator)


if __name__ == "__main__":
    register()

    # test call
    bpy.ops.object.keyframe_changer('INVOKE_DEFAULT')