In the terminology of both Canada and the US, neither ESTA nor eTA is considered to be a visa.
can anyone tell me if I can fly into the US with an ESTA from the EU, stay three months and then visit Canada with an ETA and fly back from Canada?
Yes, you can, although the limit for your duration of stay in the US is 90 days, not three months.
That is: will I be allowed to get an ESTA for the US if my return ticket is from Canada?
And, if so, Will I be allowed to enter Canada from the US with tourist visas?
As noted above, you won't actually have a tourist visa for either country, but yes, you can fly directly into Canada from the US provided you have an eTA.
Do note that if your return trip from Canada to your home country includes transit through the US, you may have a problem. See VWP or B2 for short stay in US on way to Canada? for more information.