I am going to stick with Q learning here to keep things simple. Most value-based reinforcement learning used for optimal control will have some statement similar to:
Choose $a$ from $s$ using policy derived from $Q$
First, yes this is always the current Q function or Q table, evaluated for the state of interest.
When you are choosing the agent's best guess at optimal actions, then this derivation of policy is fixed:
$$\pi(s) = \text{argmax}_a Q(s,a)$$
This matches your form for a deterministic policy (although it is always possible to express a deterministic policy as a stochastic one with probabitly of 1 choosing its selected action). In Q-learning this policy is the target policy that you are currently learning the value of.
When it comes to taking actions in the environment to gain new observations, you do not use the target policy, because it does not explore. Instead you use a different behaviour (or exploring) policy. It is important for Q learning to work in theory that this policy is "soft" - that it has some non-zero chance of selecting any action.
A popular choice for the behaviour policy is to use $\epsilon$-greedy, which is a stochastic policy that selects a random actiom with probability $\epsilon$, otherwise it selects the greedy policy. The greedy policy is definitely "derived from Q", so the $\epsilon$-greedy is too.
In fact it is not 100% necessary to use a "policy derived from Q" for the behaviour policy for Q learning to work. A completely random policy can work, for instance. The learning rate is better though - often much better - if current highest action value estimates are selected more often. This allows the agent to explore state action pairs close to its best guess at optimal.
There are a few other ways to derive behaviour policies from Q table. There is an unwritten assumption in the pseudocode that this will be done in a way that favours the higher-valued actions.
You can come up with any method that creates a stochastic policy function from Q values and has the following traits:
There is a chance of selecting any action
There is a higher chance of selecting the current highest valued actions
Optionally, the preference for highest valued actions becomes stronger as the agent becomes better at the task
If you can do this, then Q learning should work well. It is still sometimes a challenge to find the balance point between exploring enough to learn new things about the environment, yet doing so close to what is currently known to be best.
Regarding this:
Choose $a$ from $s$ using policy derived from $Q$ updated so far
Yes although most sources do not spell that out in full, relying on the use of $Q$ as a variable/data structure to imply it.
The target policy in Q learning is not directly the optimal policy (that is not possible unless you already know it), but the best guess at what would maximise expected return given the updates to Q so far. This keeps shifting as more knowledge is obtained.