Mixed device grounding
It is a fairly safe bet that an oscilloscope input has one side connected to earth through its power chord. If it has a BNC connector as input, the shell of the BNC will likely connect to ground. Its easy to measure with your multimeter "ohm" function or "continuity" function.
A battery-powered oscilloscope is not ground-connected, but you should assume that significant capacitance appears from it to ground, possibly through the user's own body. The "hot" 'scope input is usually expected to be 1 Meg ohm in parallel with tens of picofarads capacitance.
Function generators are far less predictable. Some have their cold-side grounded to earth (to their power-plug ground) while others float. A floating generator is more versatile, allowing a few to be stacked in series. The manual should tell you how many volts above or below ground you may stretch its cold-side connection. The rare oscilloscope that is ungrounded should state a similar spec in its manual
You may certainly connect oscilloscope and function generator grounds together. A common fault is mis-identifying which function generator or 'scope output is "ground-side". Cross-connecting the hot terminal of one to the cold terminal of the other may cause you to believe that one instrument is faulty. Connecting the ground of a grounded 'scope to the ground of a grounded generator creates a ground-loop that can cause some very subtle noise problems when measuring very small signals.
Multimeters are universally ungrounded, even when powered from a wall plug.
When using a 'scope plus function generator with other equipment, it is wise to consider these measurement tools to be grounded, and that any connection you make to their cold side will ground it.
There are sections of your wall-connected phone charger that cannot stand to have a ground-connection made - the circuit will fail. Other sections of a phone charger can accept being grounded with no problem. Moving the ground-connection around while probing an unfamiliar circuit should be done with considerable forethought - are you grounding a forbidden circuit area? It is a very easy mistake to make, but the spectacular results usually ensure that it is not made often in future.