For the vast majority of citizenship applicants the answer to this question is easy, YES.
However, for some citizenship applicants the answer to this question may be an emphatic NO.
Thus, categorical declarations, such as "Yes you can," are NOT accurate and can be very, very bad advice for particular applicants.
In particular, citizenship applicants who became Permanent Residents of Canada as members of the refugee or protected person class may risk a cessation investigation or even actual cessation proceedings if they travel to the home country. This is because travel to the home country is presumed to constitute reavailment of home country protection, which is grounds for cessation of protected person status, and cessation of protected person status automatically terminates PR status, which renders the individual ineligible for citizenship. For those who came to Canada as a refugee once they become a citizen, that is AFTER they have taken the oath and delivered the certificate of citizenship, THEN it is OK to travel to the home country (so far as Canada is concerned; obviously travel to any other country also depends on the laws of that country as well).
There is no such risk for those who became a Permanent Resident as members of other immigration classes, such as family sponsorship or skilled worker or Express Entry.
Caution Re Extended Travel Abroad While Citizenship Application is Pending:
Another aspect to consider, of course, is the duration of the trip and logistics related to making sure you timely receive communications from IRCC, including arrangements for collecting your mail.
Brief travel abroad, such as for two or three weeks, is NO big deal. IRCC information advises applicants to notify IRCC if they are traveling abroad for more than two weeks, but early in the process there is minimal risk of missing a communication from IRCC and, in any event, until AOR there is no file number which would enable notifying IRCC of the travel.
There are, in contrast, logistical risks if the applicant goes abroad for an extended period of time. These are discussed in depth in topics specifically about leaving Canada after applying.