You likely have to declare it, or rather, I would err on the side of caution.
A person more familiar with British criminal law should correct me if it's wrong, but on the government website it says:
You have to admit an offence and agree to be cautioned. You can be arrested and charged if you don’t agree.
https://www.gov.uk/caution-warning-penalty
And it is my understanding that cautions are nonetheless recorded somewhere and may be disclosed (unlike a simple oral warning given by officers in some other countries like Canada).
You should answer yes to
Have you ever committed ... a criminal offence?
and explain the circumstances.
A misrepresentation finding, unless successfully challenged, may cause a five-year inadmissibility. While a good lawyer or consultant can argue that not disclosing cautions and certain penalty offences should not be seen as misrepresentation and they may be successful (after all, Canadian immigration is not asking you to disclose all parking and speeding tickets, which are technically also "criminal" offences in some countries: the word "criminal" is not well-defined in many places), I would still declare it.
If so, will this stop me from going to Canada?
Likely not. Your eTA will require manual processing, and it is likely that you will be asked to produce the relevant police records (criminal record checks, original caution notice etc.).
Inadmissibility arises from foreign acts that are criminal offences abroad and in Canada:
A foreign national is inadmissible on grounds of criminality for ... (c) committing an act outside Canada that is an offence in the place where it was committed and that, if committed in Canada, would constitute an indictable offence under an Act of Parliament.
Simple possession of small amounts (<30g) of cannabis is not a criminal offence in Canada anymore, and should not bar you from entry.
If your eTA is nonetheless refused, you may want to hire an experienced lawyer or regulated consultant (the key is experience with overcoming criminality inadmissibility) for advice.
You probably know this (or not), but DO NOT BRING CANNABIS INTO OR OUT OF CANADA (unless you are doing it with the proper authorizations): crossing the border with cannabis is still illegal in most cases and you can be barred from entry for that.