The proliferation of Internet-of-Things (IoT) technology and its reliance on the license-free Industrial, Scientific, and Medical (ISM) bands have rendered radio spectrum scarce. The IoT can nevertheless obtain great advantage from Cognitive Radio (CR) technology for efficient use of a spectrum, to be implemented in IEEE 802.11af-based primary networks. However, such networks require a geolocation database and a centralized architecture to communicate white space information on channels. On the other hand, in spectrum sensing, CR presents various challenges such as the Hidden Primary Terminal (HPT) problem. To this end, we focus on the most recently released standard, i.e., IEEE 802.11ah, in which IoT stations can first be classified into multiple groups to reduce collisions and then they can periodically access the channel. Therein, both services are similarly supported by a centralized server that requires signaling overhead to control the groups of stations. In addition, more regroupings are required over time due to the frequent variations in the number of participating stations, which leads to more overhead. In this paper, we propose a new Multiple Access Control (MAC) protocol for CR-based IEEE 802.11ah systems, called Restricted Access with Collision and Interference Resolution (RACIR). We introduce a decentralized group split algorithm that distributes the participating stations into multiple groups based on a probabilistic estimation in order to resolve collisions. Furthermore, we propose a decentralized channel access procedure that avoids the HPT problem and resolves interference with the incumbent receiver. We analyze the performance of our proposed MAC protocol in terms of normalized throughput, packet delay and energy consumption with the Markov model and analytic expressions. The results are quite promising, which makes the RACIR protocol a strong candidate for the CR-based IoT environment.