Yes you can use the KW test with discrete values, and I think that's typically the case for most (all?) tests. There's nothing special about discrete values in data ... because what typically matters is the precision of your value rather than whether its a real or an integer, and real life measurements don't have infinite precision so data is never really "continuous". It'd be different if you were fitting distributions since some distributions exist especially for count data ... but even then modelling discrete data that looks Gaussian as Gaussian even though it can't possibly be is pretty common. On the KW topic, more precisely (from Wikipedia):
If the researcher can make the assumptions of an identically shaped and scaled distribution for all groups, except for any difference in medians, then the null hypothesis is that the medians of all groups are equal, and the alternative hypothesis is that at least one population median of one group is different from the population median of at least one other group.
So you can use it to compare medians under the assumption that both samples come from the same distribution. @dave points out that IF the distributions are the same, comparing medians and means would be the same BUT if the distributions are not the same than comparing medians and means may NOT be the same. Therefore, one cannot assume that this test is a comparison of means because it is a valid comparison of medians.