I know that in the Roman Republic, with Lex Genucia (342 BC), it was prohibited to hold two offices at once, but does being a Senator count as an office? And if it does, could a Senator leave his position, hold another office for a year and then return to his place on the Senate (since the appointment to the Senate was for life)?
does being a Senator count as an office?
No. Senators were explicitly privati, private citizens, as opposed to magistri. It was an extremely important, arguably the central, element of the senate's self-ideology, that they were a council of non-magistrates that held little official power but a great deal of auctoritas. The distinction appears quite frequently in Cicero, who in speeches to the senate routinely distinguishes between magistrates who are in the audience (and therefore not senators) and privati, or senators. Cicero also makes sure to distinguish between the actions of privati and magistrates, often praising or blaming someone for acting appropriately or otherwise as a magistrate or privatus. Similarly, though Augustus and his successors were senators, they routinely held no magistracies, except for occasional consulships which following Augustus were usually resigned. Therefore the emperors were, legally speaking, privati, and on the same legal level as other senators, meaning that they could technically be taken to court and could suffer capital punishment and so forth. Probably the most spectacular case of the privatus/magistri distinction's prominence was during the Catilinarian Conspiracy in 63. While all the urban conspirators who were captured were senatorial in rank, there was no issue with putting them to death, except for the problem that legally as citizens they were supposed to be put on trial, and that in fears of a riot to break them out Cicero interpreted the SCU that had been passed probably somewhat loosely to include them. A procedural issue was that Lentulus, who had been consul in 71, was praetor in 63. He was therefore not a senator--a privatus--but a magistrate, and could not legally be executed while in office. The fact that he was of senatorial standing, though not currently a senator, and that he was of consular rank were also important, but only on ideological grounds, not legal ones.