Yep. If I'm correctly understanding what you're asking, here are the steps:
- Observe the picture below. Click the Marker icon (circled in the pic). This will open the marker track, seen just below the toolbar (underlined in the pic). You will already have 'Start' and 'End' markers, but you cannot use those for this purpose. They are kind of special.
- Place the cursor at the point at which you want playback/recording to stop.
- Click the '+' sign (arrow in the pic) to create a marker at the current cursor position.
- Right-click on the marker you just created.
- In the menu that appears, check the box labeled 'Stop at Marker'.
That's all there is to it.