You can place an expansion tank anywhere between the check valve and WH. I prefer to place it where it can be serviced and so that conducted heat (or heat from any source) from the WH can not reach it. Hot water will probably cause the bladder inside the expansion tank to have an early death. The only way I would use the top inlet port would be to have an inverted U heat trap built so hot water did not reach the expansion tank.
Go to Tanklets when entering The Tank and then to Expansion Tank for a previous discussion.