Keep your legs in the same position they would be in if you had stirrups. Do not pinch with your knees (though admittedly, this might be tough at first!), but squeeze with your calves to keep contact. Try to keep your heels down too. Sit up nice and tall and really work on finding your center of gravity. Focus on moving with the horse's stride and not just bouncing around everywhere. It's difficult to do at first, but posting at the trot with no stirrups will help with that.
If I were you, I would do some walking without stirrups first, and maybe ask your instructor if you can weave through cones and other turning exercises that would require you to have to adjust your seat and balance. Also work on transitions--for instance, random halts. Once you have all this down at a walk, then begin working at a trot. Avoid cantering until you've got the trot figured out. Cantering in some ways is easier, but it's also way harder. I almost fell off a couple weeks ago cantering with no stirrups.
Good luck! No stirrups is really difficult... I totally understand. It just takes lots and lots of practice and working on your balance.