There is a lot in this question.
First, a "heap" with a "clustered index" is no longer a heap. A heap is an unordered set of data. A clustered index orders the data.
Next, if your clustered index has data compression turned on, then the table does too as they are the same thing on disk. NON-clustered indexes though would not benefit from table data compression. See: https://dba.stackexchange.com/questions/49757/clustered-index-compression-vs-table-compression-are-they-the-same-thing
This page has a good reference on fragmentation:
And for the last question about the scanning mode for index statistics, this is just for reporting purposes. I am assuming this is when you run something like:
FROM sys.dm_db_index_physical_stats(DB_ID(), NULL, NULL, NULL , 'SAMPLED')
Microsoft is going to be your best bet for details on that: https://docs.microsoft.com/en-us/sql/relational-databases/system-dynamic-management-views/sys-dm-db-index-physical-stats-transact-sql?view=sql-server-ver15
But basically, it just changes how hard it looks at the indexes to ensure data accuracy. Limited doesn't look at the leaf level, sampled looks at the leaf level but estimates the compression, detailed looks at everything to get you accurate information. Limited will be the fastest, sampled will be slower, detailed will be the slowest. To quote the article:
With LIMITED mode, compressed_page_count is NULL because the Database Engine only scans non-leaf pages of the B-tree and the IAM and PFS pages of the heap. Use SAMPLED mode to get an estimated value for compressed_page_count, and use DETAILED mode to get the actual value for compressed_page_count. The SAMPLED mode returns statistics based on a 1 percent sample of all the pages in the index or heap. Results in SAMPLED mode should be regarded as approximate. If the index or heap has fewer than 10,000 pages, DETAILED mode is used instead of SAMPLED.
Does the above answer your questions?