No, when you block a number on your iPhone, it will block both iMessages and SMS messages, as well as phone calls from that number. There is no built-in method to block only iMessages from a specific number.