Music has no truly universal definition. The closest definition to universal is that music is the organization of sound, typically through manipulation of pitch and rhythm. Instruments are commonly used, but not required.
Rapping can be spoken word, or singing. Rap keeps a beat, whether or not music is playing, and the very condition of keeping a beat, a rhythm, is universal in most genres of music.
That you have such a limited definition of music and no understanding of genre you've attempted to describe leads me to wonder why you would bother making any statements on the subject at all.
What do you actually know about instruments, what do you actually know about rap? Something you heard on the radio? I happened to catch some rugby off an Indian channel, that doesn't qualify me as knowledgeable about rugby or India.
S3C
So because, there is no melody, means it's not music?
So would you say a snare drum solo isn't music because there's no composed melody?
although technically that isn't true, all music has pitch (otherwise, you wouldn't be able to hear it) and therefore has a melody. Rapped vocals are melodic, just in a more subtle way than general singed lines. In the same respect, rap in general tends to be more rhythmically complex than singing.
On the other hand, lyrics isn't music. It's the sound (whether spoken/rapped or sung) that makes it music.
The amount of difficulty it takes to rap and/or sing is entirely personal and means nothing when trying to classify music.
Sol
Just because it has pitch doesn't make it a melody.
A melody is the first thing that catches your ears, you hear a melody even if there is a harmony that goes with a melody.
When something that doesn't pop out in a song means it's not the melody. The melody is the thing that singers sing, you can't rap a melody.