Can you get a Mathematics PhD if you're an engineer?
The title of your degree does not matter as much as the courses you have taken. If you have taken several upper-level courses, have convincing letters from mathematics faculty, and demonstrate your interest in mathematics in general, you have every chance of getting into a doctoral program in mathematics. 

However, if you finish undergrad with only the minimum of math courses required for your engineering degree, and then apply for a math doctoral program, admissions committees will not look fondly on that. Then you might have to supplement your math background in some other way. 

This also applies to people with math degrees that are not particularly deep. In the end it's the experience you have had with mathematics that counts, not the particular title of your major/degree.