Rockets can only attack air units. Look at the top screen for info. If there is an arrow pointing up or down, you can attack it. If there is a minus sign, you can't.
Actually, that's missile units. Rockets can attack ground units. But I have another example. Was doing the Almost Home mission last night and tried to attack a jet fighter with my rocket unit which was about three or four space away. According to the range when I pressed the B-button over my rocket unit, it said the jet fighter was in range, but I still wasn't allowed to attack it. I don't get it.