Yes, it can be done using $if / $endif statements. Take a look at the two examples attached. Using the Use Cases Word report template as a starting point, we replaced the Main Success Scenario sections with some keywords designed to indicate in the report if extensions for a particular step exist or not.
In example 1, a notification that extensions exist for a given step is inserted into the report. In example 2, the extension numbers themselves are listed, providing a little more detail.