This story is likely from a children’s anthology. Little boy lives in a spaceship (maybe space colony?). He has a pet (maybe turtle?). Pets are rare due to scarcity. A group of visitors come (maybe from another colony) and are amused by the pet. The boy is pressured to give the pet as a gift to the visitors.
This could be Bruce Coville’s “I, Earthling” which appears in several of his collections. Miniaturised animals are rare and the boy has a pet tiny panda or polar bear (I forget exactly what!). Because he breaks some rules of cultural exchange with the aliens there is pressure on him to give them the pet when they admire it.