Did the ROC while it was still in power in Mainland China ever had elections or anything close to an actual republic?
At first, not really but there was an initial expectation that a democracy would soon form. After the adoption of the Constitution of 1913, unelected representatives from across the country were inducted into the new National Assembly, who it was hoped would form a council to guide the country until wider, free elections would take place. However the National Assembly was almost immediately supplanted in political and military power by localized warlords and was disbanded within a couple of years. Its only notable service was the acceptance of the abdication of the Qing dynasty.
Until 1928 there is no legitimate elected body or election system in place, although several warlords attempt to cement their legitimacy and control by holding “free” elections, but none of these warlords ever received international recognition in any way. Come 1926 and the Northern Expedition under Chiang Kai-Shek. After two years hard fighting, the KMT directly controls the Chinese heartland with many warlords holding quasi-independence while owing nominal loyalty to the new Nanjing govt. Add in the Communist influence on his own party and Chiang decides free elections are no-go because his own control over the country is shaky at best. Chiang, acting as head of the KMT’s semi-elected party assembly the KMT National Congress (which despite the name is only the party’s congress, not a national one), suspends the 1913 Constitution which was practically defunct anyway and plans a constitutional council to be convened at a later date. In the meantime the government will be headed by the Central Executive Committee of the KMT. The Chairman of the Executive Committee would serve as Chairman of the National Government who was also head of the Army. Unsurprisingly, at the time of ratification by the KMT party council, Chiang held all of these positions, effectively making him dictator. Chiang promised to give up these powers to a freely elected government after a period of “political tutelage” of the Chinese people. He did actually convene a Constitutional Council in 1948 but that was interrupted by the Chinese Civil War and that document was never implemented on Mainland China. After some revisions it now serves as the Constitution of the Republic of China (Taiwan). It’s worth noting that Chiang actually encouraged the formation of non-Communist political parties during his rule and insisted on the new constitution including input from other parties, not just the KMT, indicating that he possibly ultimately planned for a full democratic government (or he could have been farming parties as a facade to provide a supposedly independent multiparty anti-communist coalition). Either way while there were no elections in Nanjing ROC, as long as they didn’t venture into communist ideology, political parties were allowed to freely operate.
TL;DR: No. While the nomenclature Republic of China gives a lot of people the mental image of a republican government, in reality the “Nanjing era” ROC was more of an authoritarian/pseudofascist dictatorship based around the central figure of Chiang. He gave indications that he supported an eventual transition to democratic process but WW2 and the civil war interrupted this.