rhythm is kind of like....the underlying beat of the song.
from what you said, it sounds like you were not fully connecting your movements to the music, or the rhythm.
since i am not naturally musical either (and i dance as well), i have some suggestions for you that have been tested through experience:
1. listening to music is very helpful. all types of music- classical, rap, country, pop, rock, whatever you like. just listen, and try to hear the beat of the song.this will help you identify the rhythm of a song more easily when you are in class.
2. when you are dancing, try to breathe deeply. this helps you calm down and focus. then, focus completely on the music, and when you dance, don't dance WITH the music. instead, try to REACT to it. follow the beat and use it as a cue for when and how you should dance- maybe then you will seem to be more connected to the rhythm.
hope this helps! good luck.