Can a Bitcoin transaction have the same address for input and output? Can a Bitcoin transaction have the same address for input and output, i.e. spend some of the coins that are linked to an address and send the rest back to that same address? Is there some reason why it is imprudent to do so?
At the protocol level, there is no such thing as "balance of an address". There are individual unspent outputs (like coins in a wallet), which must be individually spent. You can't partially spend an output, but you can split/combine it.

So for example, you have a 70 BTC output assigned to an address, and a 80 BTC output assigned to the same address. Some software will show this as 150 BTC balance of that address, but you still need to know the individual outputs to spend them. If you want to send 100 BTC to someone, you would consume those two outputs in a transaction, and create two new outputs using it, a 100 BTC one (to the recipient) and a 50 BTC one (back to yourself).

Whether you use a new address for that 50 BTC "change" output doesn't matter to the protocol. You can reuse the old one, but will make it obvious to everyone in the world which who was the sender and who was the recipient in the transaction. Using a fresh address improves privacy.

Seen otherwise: reusing the same address may look convenient, as it allows you (and software you use) to more easily distinguish what your balance is, but it does this at the cost of making it obvious to everyone in the world. This hurts Bitcoin's privacy - not just yours, but that of everyone in the system.