My suggestion is somewhat roundabout, but it provides almost exactly what you're looking for by enabling the use of open and free WMS data from various sources.
Peakbagger is an app that links with the peakbagger.com mountain database. These are aimed at climbers and mountaineers, but it has several abilities that can be used in other fields:
- Choice of around 10 basemaps, several of which are topographical data
- Ability to download map data from those basemaps around peaks for offline use
- Ability to record GPX tracks and waypoints
- The website and app are not open source in the sense that you can't obtain the source code and modify it. They are free of any charge though. Any licensing that was required to use the WMS basemaps is paid and handled by the website owner or the app owner (two different people). To offset this, there are ads, which can be removed for logged in users.
You can create an account on the website to log ascents and hikes, I can't remember if the app requires you to link your account before you can use it.
I mainly use that app for logging my ascents while on extended trips, but I also have used it to replace my handheld GPS on day-hikes.
The main drawback is that you can't do routing or trip planning, only show basemaps, saved tracks, and peaks in the database.