iPhone without service sending iMessage to another iPhone

Pardon my ignorance of iPhones, but can an iPhone without service (i.e., no phone number) send, via WiFi, an iMessage to another iPhone (that presumably has service)?

Yes