'Etiquette' of including course lecturer as author in a paper
Authorship is reserved for people who contribute to the scientific output of the article. It is not clear to me that the cases you mention qualify although they could. The Vancouver Protocol (here as given by the ICMJE) provide a good basis for assessing authorship. If your course lecturer fulfil these criteria and thus actively participate in the creation of the article then all is fine. If the lecturer takes no active part then the appropriate way would be to place a note in the acknowledgement of the contribution.