Before the invention of CIDR, did hosts also have a subnet mask assigned or only have an IP address and the network was determined by the class of the IP address?
Hosts had (and still have) a subnet mask, because classful networks could be subnetted into smaller networks.
In fact, the process of dividing a classful network into smaller pieces creates "sub-networks," which is where the term "subnet" came from.
End devices or hosts will always need a subnet mask to determine which IP addresses are local and which IP addresses are remote (need to be routed via Gateway). There was and still on certain operating systems, auto filling of subnet mask, when you configure the IP address for an interface based on class, which can be overwritten. Routers on the other hand did make assumption on the Subnet, for example earlier RIP version 1 would not send out subnet mask when advertising Networks, it was always assumed that the Network is Classful, hence no need for an explicit mask because it is implicit in the network class.