I don't think there is a way to get both folders and test sets with calling one function. But you can get the folders with the method you described. And you can get the immediate child-test-sets of a TestSetFolder via the TestSetFactory of this folder:
test_set_factory = lab_folder.TestSetFactory
test_sets = test_set_factory.NewList("")
test_sets.each do |test_set|
puts "Test Set: #{test_set.Name}"
end
That should print you the names of all TestSets in the lab_folder. I think you cannot have TestSets directly in your root folder, so you can use the TestSetFactory only on sub folders.