Google collects users behavioral data independently of websites having Google Analytics installed.
Types of user behavior data used by Google include click-through rate (CTR), navigational paths, time, duration, and frequency.
The way they do this is by tracking users behavior on each set of organic search results in the same way they do with paid ads, in simple words, they basically store in a database data associated with the use of all the links appearing in SERPs. Search engines also weigh the probability of a link being clicked in relation to its position and how this influences further user’s behavior on those websites a user visits, becoming arguably an essential part of how the algorithm works.
Be conscious with this idea, Google as a service provider will track users and their relationship with your website, not websites. Of course, they will crawl your website to classify the information it is providing in response to their users queries, but they will essentially track and try to determine their users level of satisfaction.
Picture this, an user query a search engine and clicks one of the links Google is providing, either the same user comes back to the same SERP and clicks another link, refine the initial query or never comes back. All these possible actions by the user are expected and being tracked to measure how well the result set is providing the right information in response to the user search intent. Google will make sure they are providing the right answer to their users, and reassess if necessary to provide a more tailored result set.
Google Analytics is a tool to provide information to you, it is part of an ecosystem Google have created to serve webmasters and of course provide some other benefits to them, but they will not rely on everyone to install Google Analytics to have the necessary information to improve their services.
Check out this video where Google clarifies that they do not use Google Analytics Data For Rankings