First an important note: terminology changed on Algorand. When I talk about “smart contracts”, I mean the current notion of smart contracts, that is stateful applications. Old stateless smart contracts (now called smart signatures) are completely different (see end of post).
CloseRemainderTo and AssetCloseTo are only present in payment and asset transfer transactions. An application call to a (stateful) smart contract won’t contain this field.
The RekeyTo field applies to the sender of the application call transaction. Since an application call is usually made by an end user, the end user is the send and they must check that the transaction they sign (as presented by the DApp wallet) does not contain rekey field as this would allow the malicious DApp to take over the user’s account. (Except if the goal of the transaction is to give the DApp control over the user’s account, which may happen in some very advanced designs).
From a DApp developer point of view, if you are only using smart contracts (and not smart signatures or any advanced features), you mostly don’t need to worry about these fields in (stateful) smart contracts, as long as you don’t use them in inner transactions.
From a user or a wallet designer point of view, you must be very careful.
ARC-1 which standardizes ways wallets receives signing requests from DApps contain very strict requirements to ensure safety of users.
However, if you are using smart signatures (formally known as -stateless- smart contracts and also known as logic sig), you must be extremely careful. Those fields must be strictly checked.
Nowadays, smart signatures are restricted to advanced DApp designs and delegation of approval.
Most DApps should not be using them