Thanks Tom_Laue. I think I finally figured it out and it was a matter of how I got the actual layer. I was initially using parameters[0].value.dataSource to get the feature class and running it on that, but that applied the logic to the entire feature class, and not just the selected features. I then tried to use parameters[0].value, but that would give me a schema lock issue. Finally, I went with the following, which seemed to work as intended:
lyr_name = parameters[0].valueAsText
lyr = arcpy.management.MakeFeatureLayer(lyr_name, 'selected_layer')