Do I have to do a Masters and a PhD thesis?
It depends largely on the country and institution.  Some PhD programs in engineering require a Master's with a dissertation.  Other programs are content with a course-work-only Master's.  Your best bet is to find a person to work with at the department of the PhD program you want to enter (which it sounds like you have already done) and follow the advice of that person.