Apple already has extensive search functionality/capability, although not integrated with browser search - most prominent are Siri Search on mobile devices and Spotlight Search on Mac (I expect that Mac's Spotlight Search will be rebranded as Siri Search in the not too distant future). This is integrated search that encompasses data/apps on the local device as well as external data sources. Both Siri Search and Spotlight categorize their results: "Siri Suggested Websites," "Siri Knowledge," "Maps" (meaning Apple Maps)...
The Maps database is fully independent of Google of course, as is the Siri voice assistant. "Siri Knowledge" indicates that the knowledge base built to support Apple's voice assistant is also tapped for keyboard-driven searches.
No search engine is built in a day, and for a long time Apple has taken a fair amount of criticism for both Maps and Siri voice assistant. We hear/see far less of that these days, which implies Apple's success at improving its data/search-driven products.
The day may come when Apple is ready to promote Siri Search as a comprehensive search tool, adding it to the list of available search engines in Safari preferences. It's also plausible that after several years as an option Siri Search would be switched over to the default search engine. However, I don't see Apple ever eliminating search engine choice for Safari as it would be a political/regulatory non-starter. Regardless, I'd imagine Apple would have a hard time getting Chrome or Edge to include Siri Search as an option.
Apple's alliance with Google for search began as a pragmatic choice. If you're going to put a "quality" device in peoples pockets, it made sense to integrate the "best" search engine (especially when you don't have one of your own). The money earned from Google for adopting that product has been a nice side benefit, but from a strategic standpoint the greater value is that it helps avoid open warfare.
I don't see Apple making a frontal assault on Google's bread-and-butter, which is browser-based searches that deliver search-based advertising. Everything in the Google empire flows from that original source. Freely-distributed Android ensures that the default search engine on the majority of the world's smartphones will be Google's. ChromeOS does the same (in a smaller way) on laptops. The freely-distributed Chrome browser helps ensure the vast majority of desktop/laptop computers will also be running to Google for search (Bing? What's that?).
But times and user interfaces change. It's not necessary to open a browser window to perform a search, it's just a very well-worn habit. On current versions of iOS/iPadOS you can open Search with a simple drag-down in the center of the Home screen. Voice assistants, of course, speak for themselves.
If we all do end up wearing Apple/Google/Microsoft/FaceBook Glasses in 10 years, the old keyboard-entry, browser-driven paradigm will be pushed to the periphery, and since each brand of wearables will be using a proprietary engine for voice- and eyeball-driven search, the world we "see" with those glasses will be skewed heavily by the hardware vendor.
As much as I'd prefer a totally non-commercial Web, that particular ship had sailed by the mid-1990s. Would I like an advertising-free browser search result? You bet (and to date, that's what Siri Search delivers). All the same, sometimes those ads turn out to be useful.
Do I think, if Apple went all-internal with Search they would totally turn their back on advertising? No. All I can hope for is that the advertising placements will be more selective and less prevalent, as Apple is likely to continue to place a higher value on user experience.