One of the key Kanban practices is Limiting Work in Progress. If you want to be pedantic, what this practice actually aims to do is reduce and stabilize Work in Progress. This improves flow, provides predictability, and is actually even more important for creating a pull-based Kanban system than visualizing your workflow using a Kanban board. I worked with several clients who limited their WIP but didn't use Kanban boards. One could argue that this practice deserves to be first on the Kanban practices list, ahead of Visualization. Here's an article from my Scrum with Kanban insights collection that dives deeper into the What, Who, and When of limiting WIP in a Scrum context.

One of the key Kanban practices is Limiting Work in Progress. If you want to be pedantic, what this practice actually aims to do is reduce and stabilize Work in Progress. This improves flow, provides predictability, and is actually even more important for creating a pull-based Kanban system than visualizing your workflow using a Kanban board. I worked with several clients who limited their WIP but didn't use Kanban boards. One could argue that this practice deserves to be first on the Kanban practices list, ahead of Visualization.

Anyhow, when a Scrum Team implements Kanban, they should definitely figure out how to limit and reduce their Work in Progress. This is a key part of their definition of "Workflow". Now, a question comes up:
Who should define the WIP Limit?
Let's assume the team is using Kanban to improve Sprint flow by visualizing and managing the Sprint Backlog. The Sprint Backlog is owned by the Developers, so it would make sense for them to own their workflow, including the WIP limits in this case.
What if the team is using Kanban from a more holistic perspective, starting with the Product Backlog and including refinement work? In this case, the Scrum Team would own the workflow and therefore need to discuss WIP limits.
Now, what if the Developers actually want to involve the Product Owner in their Sprint flow - e.g., to review and accept a story during the Sprint before it goes through testing? Who decides whether to do this? Who owns the Sprint Backlog in this case? I think it is the Scrum Team. And this is generally where teams should lean - while there are specific accountabilities on the Scrum Team, most importantly, the Scrum Team is accountable for working effectively to deliver value.
Ok, so we understand who defines the workflow and, therefore, the WIP limits.
Should WIP limits be changed to deal with mid-sprint high-priority work?
Now let's assume a team is mid-Sprint, and there's an important, valuable item the Product Owner wants to add to the Sprint Backlog. It is aligned with the Sprint Goal. The team is currently at its WIP Limit. Could they add this item? Should they? What needs to happen to the WIP limit?
My take on this is that, first of all, a decision needs to be made whether to pull this item into the Sprint Backlog. This discussion isn't related to Kanban at all. It is a core Scrum question, and the answer is that it is up to the team to agree to pull a new item into the Sprint Backlog. The Sprint Goal can be used to assess how aligned this item is with the current focus.
If the item is pulled into the Sprint Backlog, the Developers need to determine whether they can start it right away. This depends on the WIP limits and the current WIP. If the team is at their WIP limit, they shouldn't pull in that new item until some room frees up. If their backlog items are pretty small, an empty WIP slot will free up pretty quickly. If items are big, it can take a while.
The longer it takes to get a normal pull slot ready, the more pressure there might be to expedite this card. What is expediting? going beyond the current WIP limits and pushing this item through the existing flow. The typical way to do this is NOT to change the WIP limit definition, but to go above the WIP limit and note a WIP exception. These exceptions can then be a topic for inspection and adaptation when the time comes to reflect/retrospect.
When should the WIP limits be inspected and adapted?
In general, I don't recommend changing WIP limits on a whim just because there's a need during the Sprint. I'd rather see an exception and discussion rather than hide the problem under a policy change.
Most of the time, Scrum Teams should adjust WIP limits during the Sprint Retrospective to create a better flow strategy, not to manage at the tactical level. This is similar to the definition of Done. We don't change the definition of Done during a sprint just because we're having trouble creating a Done Increment. We note the exception, maybe even fail to create a really Done Increment, and we discuss the definition during our Retrospective.
Having said that, there is nothing stopping them from adjusting WIP limits at ANY point throughout the Sprint.
In other words, there's a difference between CAN and SHOULD
How should Scrum teams limit their WIP?
One last thing to note about limiting WIP is that, while we typically talk about it as per-lane constraints in your workflow, this is just one specific way to do it. You could limit the amount of work in progress per person, per the entire team throughout their workflow, or, actually, you could limit WIP by time. E.g., "we won't work on more than 10 items this week". Hey - that sounds familiar! #SprintForecast.
About My Flow Practice
Figuring out when/how to limit WIP in a way that accelerates sustainable value delivery is a key aspect of my flow advisory services. Whether it's at the team, group, or portfolio level, visualizing and accelerating flow is my favorite transformation hack - it drives such interesting conversations, realizations, and behavior changes.